Hi Ken,
My netstat -i output is:
$ 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 147081576 0 0 0 117483697 0 0
0 BMRU
lo 16436 0 2713464 0 0 0 2713464 0 0 0
LRU
And when I pass that through the sed filter at around lines 115 and 200:
$ netstat -i | sed \
> -e 's/\*/ /' \
> -e 's/\([0-9]\)\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] \)/\1 \2/g'
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 1 47085193 0 0 0 1 17488008 0 0
0 BMRU
lo 16436 0 2713552 0 0 0 2713552 0 0 0
LRU
Its chopped the 147081576 and 117483697 into two fields, each, and from
there (I think) its all downhill - the pminfo output is not broken like
that ... and we compare mismatched field numbers eventually, etc. Ah,
I just found the comment in the test (search for "Note" or "hack").
If I take those two lines out (the -e 9-digit-num-split bit), the test
passes. Sooo, it would seem that certain (older?) versions of netstat
merged fields, and current versions don't ... so we're a bit hosed here.
If most current versions do the right thing, can we "get off on a legal
technicality" and just remove the workaround now, perhaps? Or do you
want to workaround this differently now? I guess we could count number
of fields via awk, and conditionally split? Getting a bit hairy at that
point though...?
thanks!
--
Nathan
|