netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, stephen@networkplumber.org
Cc: netdev@vger.kernel.org
Subject: Re: [PACTH iproute2-next] ip: dynamically size columns when printing stats
Date: Sun, 9 May 2021 16:53:00 -0600	[thread overview]
Message-ID: <ae8aee40-4987-0554-e415-0922aca85cd6@gmail.com> (raw)
In-Reply-To: <20210501031059.529906-1-kuba@kernel.org>

On 4/30/21 9:10 PM, Jakub Kicinski wrote:
> This change makes ip -s -s output size the columns
> automatically. I often find myself using json
> output because the normal output is unreadable.
> Even on a laptop after 2 days of uptime byte
> and packet counters almost overflow their columns,
> let alone a busy server.
> 
> For max readability switch to right align.
> 
> Before:
> 
>     RX: bytes  packets  errors  dropped missed  mcast
>     8227918473 8617683  0       0       0       0
>     RX errors: length   crc     frame   fifo    overrun
>                0        0       0       0       0
>     TX: bytes  packets  errors  dropped carrier collsns
>     691937917  4727223  0       0       0       0
>     TX errors: aborted  fifo   window heartbeat transns
>                0        0       0       0       10
> 
> After:
> 
>     RX:  bytes packets errors dropped  missed   mcast
>     8228633710 8618408      0       0       0       0
>     RX errors:  length    crc   frame    fifo overrun
>                      0      0       0       0       0
>     TX:  bytes packets errors dropped carrier collsns
>      692006303 4727740      0       0       0       0
>     TX errors: aborted   fifo  window heartbt transns
>                      0      0       0       0      10
> 
> More importantly, with large values before:
> 
>     RX: bytes  packets  errors  dropped overrun mcast
>     126570234447969 15016149200 0       0       0       0
>     RX errors: length   crc     frame   fifo    missed
>                0        0       0       0       0
>     TX: bytes  packets  errors  dropped carrier collsns
>     126570234447969 15016149200 0       0       0       0
>     TX errors: aborted  fifo   window heartbeat transns
>                0        0       0       0       10
> 
> Note that in this case we have full shift by a column,
> e.g. the value under "dropped" is actually for "errors" etc.
> 
> After:
> 
>     RX:       bytes     packets errors dropped  missed   mcast
>     126570234447969 15016149200      0       0       0       0
>     RX errors:           length    crc   frame    fifo overrun
>                               0      0       0       0       0
>     TX:       bytes     packets errors dropped carrier collsns
>     126570234447969 15016149200      0       0       0       0
>     TX errors:          aborted   fifo  window heartbt transns
>                               0      0       0       0      10
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> Note - this patch does depend on the trivial nohandler print fix.
> 
>  ip/ipaddress.c | 146 +++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 106 insertions(+), 40 deletions(-)
> 

good improvement. applied. Thanks,


      parent reply	other threads:[~2021-05-09 22:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01  3:10 [PACTH iproute2-next] ip: dynamically size columns when printing stats Jakub Kicinski
2021-05-03 14:57 ` Stephen Hemminger
2021-05-03 16:00   ` Jakub Kicinski
2021-05-03 17:16     ` David Ahern
2021-05-03 19:22       ` Jakub Kicinski
2021-05-04  2:15         ` David Ahern
2021-05-04 16:46           ` Jakub Kicinski
2021-05-09 22:53 ` David Ahern [this message]

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=ae8aee40-4987-0554-e415-0922aca85cd6@gmail.com \
    --to=dsahern@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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).