Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: "Dan Lüdtke" <mail@danrl.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Structure(d) output of wg?
Date: Wed, 14 Dec 2016 22:09:57 +0100	[thread overview]
Message-ID: <CAHmME9pePj0thgb_NDVr_iN9rcvdwQMz=4_zRtP_57g=QO4_ow@mail.gmail.com> (raw)
In-Reply-To: <AD79A695-30E3-425D-9D7F-51AE2A25384D@danrl.com>

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@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

  reply	other threads:[~2016-12-14 21:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 20:04 Dan Lüdtke
2016-12-14 21:09 ` Jason A. Donenfeld [this message]
2016-12-14 21:16   ` Dan Lüdtke
2016-12-14 21:15     ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHmME9pePj0thgb_NDVr_iN9rcvdwQMz=4_zRtP_57g=QO4_ow@mail.gmail.com' \
    --to=jason@zx2c4.com \
    --cc=mail@danrl.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).