Description of problem: I have found that the output of "netstat -ni" results in the merging of columns. The columns in questions are the Met and RX-OK as well as RX-OVR and TX-OK which is needed by the monitor script. Present netstat from the net-tools-1.60.tar.bz2 release: --- # /bin/netstat -ni 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 079203284 0 0 0 9782304 0 0 0 BMRU lo 16436 026090095 0 0 026090095 0 0 0 LRU --- I have found that adjusting the following lines in net-tools-1.60/lib/interface.c fixes the issue. --- # diff lib/interface.c lib/interface.c.old 583c583 < printf("%5d %3d ", ptr->mtu, ptr->metric); --- > printf("%5d %3d", ptr->mtu, ptr->metric); 586c586 < printf("%8llu %6lu %6lu %6lu ", --- > printf("%8llu %6lu %6lu %6lu", ---- Which results in : --- # /bin/netstat -ni 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 79240273 0 0 0 9785204 0 0 0 BMRU lo 16436 0 26114268 0 0 0 26114268 0 0 0 LRU --- the linux netstat developers state: -----Original Message----- From: Bernd Eckenfels [ecki.de] Sent: 17 June 2003 17:45 To: Frank Currie Cc: 'philb'; 'net-tools.de' Subject: Re: "netstat -ni" from net-tools-1.60.tar.bz2 On Tue, Jun 17, 2003 at 04:41:40PM +0100, Frank Currie wrote: > list if needed but I have found that the output of "netstat -i" results in > the merging of columns. The columns in questions are the Met and RX-OK as > well as RX-OVR and TX-OK. this should be fixed in debian package 1.60-7, which will also eventuelly become the next upstream version. Greetings Bernd -- (OO) -- Bernd_Eckenfels.de -- ( .. ) ecki@{inka.de,linux.de,debian.org} http://home.pages.de/~eckes/ o--o *plush* 2048/93600EFD eckes@irc +497257930613 BE5-RIPE (O____O) When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl! Version-Release number of selected component (if applicable): [root@sptlinvm1 bin]# netstat -V net-tools 1.60 netstat 1.42 (2001-04-15) Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang and others +NEW_ADDRT +RTF_IRTT +RTF_REJECT +FW_MASQUERADE +I18N AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK +ECONET +ROSE HW: +ETHER +ARC +SLIP +PPP +TUNNEL +TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB How reproducible: Every time once the cloumns exceed 8 characters. Steps to Reproduce: 1. 2. 3. Actual results: # /bin/netstat -ni 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 079203284 0 0 0 9782304 0 0 0 BMRU lo 16436 026090095 0 0 026090095 0 0 0 LRU Expected results: # /bin/netstat -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 79240273 0 0 0 9785204 0 0 0 BMRU lo 16436 0 26114268 0 0 0 26114268 0 0 0 LRU Additional info:
Please ignore the statement "which is needed by the monitor script" as it shouldn't have been included in the post.
Yep, i'll be including this fix in the next build. Has some duplicates as well (iirc). Read ya, Phil
Fixed in latest net-tools, will be built for AS2.1, too. Read ya, Phil