From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: mail@danrl.com Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 6e42d837 for ; Wed, 14 Dec 2016 21:06:46 +0000 (UTC) Received: from mx.sealand.io (mx.sealand.io [193.160.39.68]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 3a6302e0 for ; Wed, 14 Dec 2016 21:06:46 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: Structure(d) output of wg? From: =?utf-8?Q?Dan_L=C3=BCdtke?= In-Reply-To: Date: Wed, 14 Dec 2016 22:16:32 +0100 Message-Id: References: To: "Jason A. Donenfeld" Cc: WireGuard mailing list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 :) =20 > On 14 Dec 2016, at 22:09, Jason A. Donenfeld wrote: >=20 > Hi Dan, >=20 > 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: >=20 > [zx2c4@demo ~]$ sudo wg show wg0 bandwidth | tail > l8gKhi5rvJChhDWHl+C7Ubj8hSHfW0HbkOOA9GQPL3Y=3D 13272 43056 > CpX3sUNoLSofE6V6X+uHnFqF5+g/fXwJeY6ploPbgV0=3D 9425 5785 > NkUUqbqhh+VV2IZYdAuVIdjpx0UopRRgO7hZju7+DW0=3D 145 89 > S3/UokM7yvoKCYOvGdyi0IiiqvrUWXsIX8FTSFl0i2E=3D 46101 152415 > FPqY/W8Z6LTgZLu69CqF1WtIPwUoG52pNNno4BRDtR0=3D 145 89 > ULFNzzUznzXzMrjRvWUlz9dQsIzEAtIG7o3s9oHRJHk=3D 145 89 > qbTrp7yhdqrvLnMg9kZNxNTd7FQRvV6jMr18G63zDhA=3D 13299 28787 > p0rDK1UEx7siGp061hekJFYkjTs3qY08TBaTfSk86TM=3D 5075 3434 > NZSZ7/JTraQ6eOseLIMQBo38cfQL8SXarfO/g99xYUI=3D 0 0 > pX7cS/weolOD5GKHhrNqtqKT4nZto50ZXczacQ5iklM=3D 95210 58850 >=20 > (Quit hoggin my bandwidth, yall ;-) ) >=20 > Jason