Structure(d) output of wg?

Jason A. Donenfeld Jason at zx2c4.com
Wed Dec 14 22:09:57 CET 2016


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