netstat statistics overflow
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
net-tools (Debian) |
Fix Released
|
Unknown
|
|||
net-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: net-tools
In netstat's summary "netstat -s" the fields 'InOctets' and 'OutOctets' appear to be a 32 bit signed value. When sending or receiving large amounts of packets the values occasionally wrap around and change sign.
$ netstat -s
...
IpExt:
...
InOctets: 201874790
OutOctets: -2029455654
...
The raw data however is correct:
$ cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
eth0:22360647 218274 0 0 0 0 0 5 76188265 129485 0 0 0 0 0 0
lab0:11152431249 131487214 0 0 0 0 0 6 51840697004 129560924 0 0 0 0 0 0
Versions:
ubuntu 10.04 - x64_86
net-tools 1.60
netstat 1.42 (2001-04-15)
Netstat should use a bigger integer type, at the very least use an unsigned interger type.
Changed in net-tools (Debian): | |
importance: | Undecided → Unknown |
status: | New → Unknown |
Changed in net-tools (Debian): | |
status: | Unknown → New |
Changed in net-tools (Debian): | |
status: | New → Fix Released |
Patch from Sami Farin is here /bugzilla. redhat. com/attachment. cgi?id= 404767
https:/
See also bugs.debian. org/561161
http://