Bug 102767 - netstat -i with interface specified doesn't work correctly, netstat -c doesn't work correctly
netstat -i with interface specified doesn't work correctly, netstat -c doesn'...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: net-tools (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-20 15:48 EDT by Ulf Zimmermann
Modified: 2015-03-04 20:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-22 08:12:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ulf Zimmermann 2003-08-20 15:48:17 EDT
Description of problem:

Man page states that "netstat -i eth0" should only print out 
the statistics for that interface. netstat is just ignoring this.

"netstat -c -i" or "netstat -c -i eth0" should print continously
statistics our about all interfaces or about the specified interface.
All it does, it prints out the first set, then just repeats the header
line.

netstat on RH9 does the -c correctly, but errors out when an
interface name is specified.

Version-Release number of selected component (if applicable):

net-tools-1.60-7 on RH8, net-tools-1.60-3 on AS 2.1, net-tools-1.60-12 on RH9


How reproducible:

Everytime

Steps to Reproduce:
1. netstat -i eth0
2. netstat -c -i
3. netstat -c -i eth0
    
Actual results:

img01 ulf /home/ulf > netstat -i eth0
Kernel Interface table
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0 6978734      0      0      0 3714217      0      0      0 
BMRU
eth0:1     1500   0     - no statistics available -                        BMRU
lo        16436   0      10      0      0      0      10      0      0      0 
LRU

img01 ulf /home/ulf > netstat -c -i 
Kernel Interface table
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0 7014628      0      0      0 3733227      0      0      0 
BMRU
eth0:1     1500   0     - no statistics available -                        BMRU
lo        16436   0      10      0      0      0      10      0      0      0 
LRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg


img01 ulf /home/ulf > netstat -c -i eth0
Kernel Interface table
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0 7041959      0      0      0 3747528      0      0      0 
BMRU
eth0:1     1500   0     - no statistics available -                        BMRU
lo        16436   0      10      0      0      0      10      0      0      0 
LRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg



Expected results:

img01 ulf /home/ulf > netstat -i eth0
Kernel Interface table
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0 6978734      0      0      0 3714217      0      0      0 
BMRU

img01 ulf /home/ulf > netstat -c -i
Kernel Interface table
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0 7041959      0      0      0 3747528      0      0      0 
BMRU
eth0:1     1500   0     - no statistics available -                        BMRU
lo        16436   0      10      0      0      0      10      0      0      0 
LRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0    35      0      0      0      21      0      0      0 
BMRU
eth0:1     1500   0     - no statistics available -                        BMRU
lo        16436   0     0      0      0      0       0      0      0      0 LRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0    31      0      0      0      27      0      0      0 
BMRU
eth0:1     1500   0     - no statistics available -                        BMRU
lo        16436   0     0      0      0      0       0      0      0      0 LRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0    33      0      0      0      23      0      0      0 
BMRU
eth0:1     1500   0     - no statistics available -                        BMRU
lo        16436   0     0      0      0      0       0      0      0      0 LRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0    32      0      0      0      19      0      0      0 
BMRU
eth0:1     1500   0     - no statistics available -                        BMRU
lo        16436   0     0      0      0      0       0      0      0      0 LRU

img01 ulf /home/ulf > netstat -c -i eth0 
Kernel Interface table
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0 7014628      0      0      0 3733227      0      0      0 
BMRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0    34      0      0      0       3      0      0      0 
BMRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0    38      0      0      0       5      0      0      0 
BMRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0    29      0      0      0       7      0      0      0 
BMRU
Iface     MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0    27      0      0      0      14      0      0      0 
BMRU



Additional info:
Comment 1 Phil Knirsch 2003-08-22 08:12:41 EDT
This has been fixed in newer releases and has been reported previously.

The -i option is still bugous though (see #102769), looking into that today.

Read ya, Phil

Note You need to log in before you can comment on or make changes to this bug.