Structure(d) output of wg?
Dan Lüdtke
mail at danrl.com
Wed Dec 14 22:16:32 CET 2016
Hi,
that would mean multiple calls to `wg` to get the desired structure filled, one for each [CATEGORY]. I can live with that, but was looking for a more efficient solution.
Cheers,
Dan
Nice bandwidth, though :)
> On 14 Dec 2016, at 22:09, Jason A. Donenfeld <Jason at zx2c4.com> wrote:
>
> Hi Dan,
>
> This already exists. While `wg show wg0` gives some hipster colorized
> output, `wg show wg0 [CATEGORY]` gives very structured output meant
> for parsing with bash or grep or sed or cut or whatever you want. For
> example:
>
> [zx2c4 at demo ~]$ sudo wg show wg0 bandwidth | tail
> l8gKhi5rvJChhDWHl+C7Ubj8hSHfW0HbkOOA9GQPL3Y= 13272 43056
> CpX3sUNoLSofE6V6X+uHnFqF5+g/fXwJeY6ploPbgV0= 9425 5785
> NkUUqbqhh+VV2IZYdAuVIdjpx0UopRRgO7hZju7+DW0= 145 89
> S3/UokM7yvoKCYOvGdyi0IiiqvrUWXsIX8FTSFl0i2E= 46101 152415
> FPqY/W8Z6LTgZLu69CqF1WtIPwUoG52pNNno4BRDtR0= 145 89
> ULFNzzUznzXzMrjRvWUlz9dQsIzEAtIG7o3s9oHRJHk= 145 89
> qbTrp7yhdqrvLnMg9kZNxNTd7FQRvV6jMr18G63zDhA= 13299 28787
> p0rDK1UEx7siGp061hekJFYkjTs3qY08TBaTfSk86TM= 5075 3434
> NZSZ7/JTraQ6eOseLIMQBo38cfQL8SXarfO/g99xYUI= 0 0
> pX7cS/weolOD5GKHhrNqtqKT4nZto50ZXczacQ5iklM= 95210 58850
>
> (Quit hoggin my bandwidth, yall ;-) )
>
> Jason
More information about the WireGuard
mailing list