[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141031111753.2b524ebb@leda.localdomain>
Date: Fri, 31 Oct 2014 11:17:53 +0100
From: Christian Hesse <mail@...rm.de>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH v3 1/1] ip-link: add switch to show human readable
output
Stephen Hemminger <stephen@...workplumber.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
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists