From: Stephen Hemminger <stephen@networkplumber.org>
To: David Ahern <dsahern@gmail.com>
Cc: Jakub Kicinski <kubakici@wp.pl>,
Stefano Brivio <sbrivio@redhat.com>,
"Yoann P." <yoann.p.public@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed
Date: Thu, 1 Nov 2018 14:38:35 -0700 [thread overview]
Message-ID: <20181101143835.2e3c69ce@xeon-e3> (raw)
In-Reply-To: <b3a7235f-3272-309e-6b8c-38dd0b7a0556@gmail.com>
On Thu, 1 Nov 2018 15:18:03 -0600
David Ahern <dsahern@gmail.com> 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"
> >>>
> >>> would mean "align everything to the right, distribute remaining
> >>> whitespace between %S, %Qr and %Qs". But it looks rather complicated
> >>> at a glance.
> >>>
> >>
> >> My concern here is that once this goes in for 1 command, the others in
> >> iproute2 need to follow suit - meaning same syntax style for all
> >> commands. Given that I'd prefer we get a reasonable consensus on syntax
> >> that will work across commands -- ss, ip, tc. If it is as simple as
> >> column names with a fixed order, that is fine but just give proper
> >> consideration given the impact.
> >
> > FWIW I just started piping iproute2 commands to jq. Example:
> >
> > tc -s -j qdisc show dev em1 | \
> > jq -r '.[] | [.kind,.parent,.handle,.offloaded,.bytes,.packets,.drops,.overlimits,.requeues,.backlog,.qlen,.marked] | @tsv'
> >
> > JSONification would probably be quite an undertaking for ss :(
> >
>
> Right, that is used in some of the scripts under
> tools/testing/selftests. I would put that in the 'heavyweight solution'
> category.
>
> A number of key commands offer the capability to control the output via
> command line argument (e.g., ps, perf script). Given the amount of data
> iproute2 commands throw at a user by default, it would be a good
> usability feature to allow a user to customize the output without having
> to pipe it into other commands.
I would rather see ss grow json support than having to make the output
formatting of every iproute2 command grow a new format management.
The jq tool looks cool, and I can see how someone could easily have
a bunch of mini-scripts to do what they want.
next prev parent reply other threads:[~2018-11-02 6:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 15:05 [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed Stefano Brivio
2018-10-30 15:05 ` [PATCH iproute2 net-next 1/3] ss: Discard empty descriptor at the end of buffer, if any, before rendering Stefano Brivio
2018-10-30 15:05 ` [PATCH iproute2 net-next 2/3] ss: Introduce option to display selected columns only Stefano Brivio
2018-10-30 15:05 ` [PATCH iproute2 net-next 3/3] ss: Beautify output when arbitrary columns are hidden Stefano Brivio
2018-10-30 16:34 ` [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed David Ahern
2018-10-30 16:38 ` Stephen Hemminger
2018-10-30 16:45 ` David Ahern
2018-10-30 17:34 ` Stefano Brivio
2018-11-01 2:48 ` David Ahern
2018-11-01 21:06 ` Jakub Kicinski
2018-11-01 21:18 ` David Ahern
2018-11-01 21:38 ` Stephen Hemminger [this message]
2018-11-02 9:58 ` Stefano Brivio
2018-11-02 9:58 ` Stefano Brivio
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=20181101143835.2e3c69ce@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=kubakici@wp.pl \
--cc=netdev@vger.kernel.org \
--cc=sbrivio@redhat.com \
--cc=yoann.p.public@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.