Hi Mark,
You made my day!
I was experiencing some weird issue on some boxes (vtnetX) and other were good (em0 which is short).
Thanks for spotting this issue and especially with the quick fix.
Regards Nicolas Lienard
Le 15 déc. 2015 à 19:28, Mark Felder <feld at feld.me> a écrit :
On Mon, Dec 14, 2015, at 11:24, Nico wrote:
So I'm proposing that the FreeBSD client be adjusted from this:
echo "[ifstat]" netstat -i -b -n | egrep -v "^lo|<Link"
To this:
echo "[ifstat]" netstat -i -b -n | egrep "<Link"
Seem reasonable? Would anyone be adversely impacted by this suggested change?
I just discovered a bug here, too. We need the -W flag for netstat to not truncate interface names.
before:
netstat -ibn | egrep "<Link|Name" | grep -v ^lo
Name Mtu Network Address Ipkts Ierrs Idrop Ibytes Opkts Oerrs Obytes Coll re0 1500 <Link#1> 00:0d:b9:34:19:5c 128999557 0 0 179670093890 69675563 0 15695977843 0 re1 1500 <Link#2> 00:0d:b9:34:19:5d 70513275 0 0 16032274028 128924310 0 177694695608 0 re2* 1500 <Link#3> 00:0d:b9:34:19:5e 0 0 0 0 0 0 0 0 bridg 1500 <Link#6> 02:77:b6:ed:58:00 70254277 0 0 16036199705 129805702 210 179003594406 0 gif0 1280 <Link#7> gif0 5346546 0 0 5718534418 4031610 6 2016239779 0 tun0 1500 <Link#8> tun0 910 0 0 120939 969 0 654231 0 tun1* 1500 <Link#9> tun1 0 0 0 0 0 0 0 0 vlan5 1500 <Link#10> 00:0d:b9:34:19:5d 476021 0 0 68166196 593906 0 598099212 0
after:
netstat -ibnW | egrep "<Link|Name" | grep -v ^lo
Name Mtu Network Address Ipkts Ierrs Idrop Ibytes Opkts Oerrs Obytes Coll re0 1500 <Link#1> 00:0d:b9:34:19:5c 128999730 0 0 179670121877 69675731 0 15696092809 0 re1 1500 <Link#2> 00:0d:b9:34:19:5d 70513451 0 0 16032379270 128924498 0 177694722117 0 re2* 1500 <Link#3> 00:0d:b9:34:19:5e 0 0 0 0 0 0 0 0 bridge0 1500 <Link#6> 02:77:b6:ed:58:00 70254415 0 0 16036300636 129805863 210 179003607634 0 gif0 1280 <Link#7> gif0 5346580 0 0 5718537650 4031628 6 2016242843 0 tun0 1500 <Link#8> tun0 910 0 0 120939 969 0 654231 0 tun1* 1500 <Link#9> tun1 0 0 0 0 0 0 0 0 vlan5 1500 <Link#10> 00:0d:b9:34:19:5d 476054 0 0 68170092 593933 0 598112493 0
If we don't have the -W flag long interface names may be confused by Xymon. eg, bridge0 bridge1 bridge2 will all be seen as "bridg" like this rrd file indicates: data/gw.feld.me/ifstat.bridg.rrd
-- Mark Felder feld at feld.me