Ifconfig uses inconsistent units
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
net-tools (Debian) |
Fix Released
|
Unknown
|
|||
net-tools (Fedora) |
Fix Released
|
Medium
|
|||
net-tools (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Intrepid |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: net-tools
The manpage of ifconfig clearly states:
Since net-tools 1.60-4 ifconfig is printing byte counters and human
readable counters with IEC 60027-2 units. So 1 KiB are 2^10 byte. Note,
the numbers are truncated to one decimal (which can by quite a large
error if you consider 0.1 PiB is 112.589.990.684.262 bytes :)
Still, my current ifconfig gives me:
wlan0 Link encap:Ethernet HWaddr 00:08:d3:05:23:0c
inet addr:172.19.3.3 Bcast:172.
inet6 addr: fe80::208:
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2592640 errors:0 dropped:0 overruns:0 frame:0
TX packets:2322789 errors:998 dropped:998 overruns:0 carrier:0
RX bytes:2617519809 (2.4 GB) TX bytes:969817396 (924.8 MB)
2617519809 bytes means 2.6 GB or 2.4 GiB. But 2.4 GB is completely incorrect.
Either fix the package or fix the man-page. I included a patch that should give correct behavior.
Changed in net-tools: | |
status: | New → Confirmed |
Changed in net-tools: | |
status: | Unknown → New |
Changed in net-tools: | |
status: | Unknown → Fix Released |
Changed in net-tools (Debian): | |
status: | New → Fix Released |
Changed in net-tools (Fedora): | |
importance: | Unknown → Medium |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040122 Debian/1.6-1
Description of problem:
collisions: 0 txqueuelen:1000
eth0 Link encap:Ethernet HWaddr 00:02:B3:63:DA:BE
inet addr:80.222.51.178 Bcast:80.222.63.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4643429 errors:0 dropped:0 overruns:0 frame:0
TX packets:4407272 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:463857499 (442.3 Mb) TX bytes:2823718271 (2692.9 Mb)
I think Mb (megabit = 1,000,000 bits) should be MiB (megabyte =
1,048,576 bytes).
Version-Release number of selected component (if applicable):
net-tools-1.60-22
How reproducible:
Always
Steps to Reproduce:
1. Use calculator: 2823718271 / 1024 / 1024 = 2692,90759182... MiB.
1048576 * 2692,90759182 = 2823718271,00024832
Additional info: