From: Christian Hesse <mail@eworm.de>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v3 1/1] ip-link: add switch to show human readable output
Date: Fri, 31 Oct 2014 11:17:53 +0100 [thread overview]
Message-ID: <20141031111753.2b524ebb@leda.localdomain> (raw)
In-Reply-To: <1414660599-25707-1-git-send-email-mail@eworm.de>
[-- Attachment #1: Type: text/plain, Size: 3127 bytes --]
Stephen Hemminger <stephen@networkplumber.org> on Wed, 2014/10/29 22:47:
> I like the idea as a concept
Great! ;)
> but there are two issues:
> 1. The IEC suffix is a rarely used thing and is non-standard
> for communications where K = 1000 M = 1000000 etc.
> Please just use standard suffices
Removed the suffix in patch v3. Not sure if it is correct, though. I do use a
base of 2, so K = 1024, M = 1048576, ...
This is what ifconfig behaves as well. Output should give the exact same
numbers (except the suffix):
# ip -s -h link list en
3: en: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
mode DEFAULT group default qlen 1000
link/ether 00:de:ad:be:ee:ef brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
26.3M 59.2K 0 68 0 0
TX: bytes packets errors dropped carrier collsns
37.0M 67.6K 0 0 0 0
# ifconfig en
en: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet XX.XX.XX.XX netmask 255.255.255.0 broadcast XX.XX.XX.255
ether 00:de:ad:be:ee:ef txqueuelen 1000 (Ethernet)
RX packets 60677 bytes 27671339 (26.3 MiB)
RX errors 0 dropped 68 overruns 0 frame 0
TX packets 69350 bytes 38874609 (37.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
> 2. Don't double print the data, if the user asks for human
> format, only show the human format.
Fixed.
Hopefully I got the line breaks right. How to check print_link_stats32()?
Even von i686 ip calls print_link_stats64() on my systems.
I did some minor changes to the error stats column alignment. Is that ok? See
the difference of before and after:
# ip -s -s link list en # before
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
mode DEFAULT group default qlen 1000
link/ether 00:de:ad:be:ee:ef brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
144544239 100441 0 0 0 1
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
808343 9630 0 0 0 0
TX errors: aborted fifo window heartbeat transns
0 0 0 0 2
# ip -s -s link list en # after
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
mode DEFAULT group default qlen 1000
link/ether 00:de:ad:be:ee:ef brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
87432187 60642 0 0 0 1
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
450437 5793 0 0 0 0
TX errors: aborted fifo window heartbeat transns
0 0 0 0 2
--
Best regards,
Christian Hesse
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-10-31 10:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-10 22:27 [PATCHv2 1/1] ip-link: add switch to show human readable output Christian Hesse
2014-10-30 5:47 ` Stephen Hemminger
2014-10-30 9:16 ` [PATCH v3 " Christian Hesse
2014-10-31 10:17 ` Christian Hesse [this message]
2014-10-31 19:31 ` Stephen Hemminger
2014-10-31 21:33 ` [PATCH v4 " Christian Hesse
2014-11-02 20:51 ` Stephen Hemminger
2014-11-03 6:53 ` Christian Hesse
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=20141031111753.2b524ebb@leda.localdomain \
--to=mail@eworm.de \
--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).