Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-11-02 Thread Stefano Brivio
On Thu, 1 Nov 2018 14:06:23 -0700 Jakub Kicinski wrote: > JSONification would probably be quite an undertaking for ss :( Probably not too much, and we would skip buffering for JSON as we don't need to print columns, so we don't have to care about buffering and rendering performance too much. Al

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-11-02 Thread Stefano Brivio
On Wed, 31 Oct 2018 20:48:05 -0600 David Ahern wrote: > On 10/30/18 11:34 AM, Stefano Brivio wrote: > > > > - the current column abstraction is rather lightweight, things are > > already buffered in the defined column order so we don't have to jump > > back and forth in the buffer while rend

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-11-01 Thread Stephen Hemminger
On Thu, 1 Nov 2018 15:18:03 -0600 David Ahern wrote: > On 11/1/18 3:06 PM, Jakub Kicinski wrote: > > On Wed, 31 Oct 2018 20:48:05 -0600, David Ahern wrote: > >>> spacing with a special character in the format string, that is: > >>> > >>> "%S.%Qr.%Qs %Al:%Pl %Ar:%Pr %p\n" > >>> > >>> wou

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-11-01 Thread David Ahern
On 11/1/18 3:06 PM, Jakub Kicinski wrote: > On Wed, 31 Oct 2018 20:48:05 -0600, David Ahern wrote: >>> spacing with a special character in the format string, that is: >>> >>> "%S.%Qr.%Qs %Al:%Pl %Ar:%Pr %p\n" >>> >>> would mean "align everything to the right, distribute remaining >>> wh

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-11-01 Thread Jakub Kicinski
On Wed, 31 Oct 2018 20:48:05 -0600, David Ahern wrote: > > spacing with a special character in the format string, that is: > > > > "%S.%Qr.%Qs %Al:%Pl %Ar:%Pr %p\n" > > > > would mean "align everything to the right, distribute remaining > > whitespace between %S, %Qr and %Qs". But it

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-10-31 Thread David Ahern
[ sorry, too many distractions and I forgot to respond ] On 10/30/18 11:34 AM, Stefano Brivio wrote: > On Tue, 30 Oct 2018 10:34:45 -0600 > David Ahern wrote: > >> A more flexible approach is to use format strings to allow users to >> customize the output order and whitespace as well. So for s

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-10-30 Thread Stefano Brivio
On Tue, 30 Oct 2018 10:34:45 -0600 David Ahern wrote: > A more flexible approach is to use format strings to allow users to > customize the output order and whitespace as well. So for ss and your > column list (winging it here): > > netid = %N > state = %S > recv Q

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-10-30 Thread David Ahern
On 10/30/18 10:38 AM, Stephen Hemminger wrote: > On Tue, 30 Oct 2018 10:34:45 -0600 > David Ahern wrote: > >> On 10/30/18 9:05 AM, Stefano Brivio wrote: >>> Now that we have an abstraction for columns, it's relatively easy to >>> selectively display only some of them, and Yoann has a use case for

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-10-30 Thread Stephen Hemminger
On Tue, 30 Oct 2018 10:34:45 -0600 David Ahern wrote: > On 10/30/18 9:05 AM, Stefano Brivio wrote: > > Now that we have an abstraction for columns, it's relatively easy to > > selectively display only some of them, and Yoann has a use case for it. > > > > Patch 1/3 fixes a rendering issue that s

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-10-30 Thread David Ahern
On 10/30/18 9:05 AM, Stefano Brivio wrote: > Now that we have an abstraction for columns, it's relatively easy to > selectively display only some of them, and Yoann has a use case for it. > > Patch 1/3 fixes a rendering issue that shows up only when display of > arbitrary columns is disabled. Patc

[PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-10-30 Thread Stefano Brivio
Now that we have an abstraction for columns, it's relatively easy to selectively display only some of them, and Yoann has a use case for it. Patch 1/3 fixes a rendering issue that shows up only when display of arbitrary columns is disabled. Patch 2/3 implements the relevant option, and patch 3/3 m