Xymon Mailing List Archive search

suggestion for xymonclient-sunos.sh under solaris 10.

2 messages in this thread

list Randall Badilla · Mon, 16 May 2011 22:19:32 -0600 ·
Hi all:
I have noticed that xymonclient-sunos.sh code on version 4.3.3 change to get
rid of mac and wsrmd nics. A nice change; but also the use of kstat on
solaris cotainers (zones) can misguide people who read the trend graphics
since kstat prints out all the nics of the equipment nor zone's configured
nics.

So I humbly  posting what I think can "fix" (talking about voiding
misguiding) since I have solaris containers with one, two or three nics (yes
subinterfaces associated to physically different nics)..also I think can be
use on 4.2.3 clients.

56,58d55
< ONZONE=`zonename`
< if test "$ONZONE" == "global"
< then
61,64d57
< else
< MYNICS=`netstat -i |cut -f1 -d" " | egrep -i -v "Name|lo|^$"  |paste -s
-d"|" - `
< /usr/bin/kstat -p -s '[or]bytes64' | egrep "$MYNICS"| sort
< fi

Any comment; welcome!

--Randall Badilla.
list Randall Badilla · Thu, 19 May 2011 10:04:07 -0600 ·
Hi People:
Maybe somebody notice a little error at the line if test "$ONZONE" ==
"global" . There were a difference between the posted coded and the real one
that I have now using on all my solaris boxes.
Sorry for that and (accept my apologizes) here is the correct code.
quoted from Randall Badilla

56,58d55
< ONZONE=`zonename`
< if test "$ONZONE" == "global"
< then
61,64d57
< else
< MYNICS=`netstat -i |cut -f1 -d" " | egrep -i -v "Name|lo|^$"  |paste -s
-d"|" - `
< /usr/bin/kstat -p -s '[or]bytes64' | egrep "$MYNICS"| sort

< fi56,58d55
quoted from Randall Badilla
< ONZONE=`zonename`
< if test "$ONZONE" = "global"
< then
61,64d57
< else
< MYNICS=`netstat -i |cut -f1 -d" " | egrep -i -v "Name|lo|^$"  |paste -s
-d"|" - `
< /usr/bin/kstat -p -s '[or]bytes64' | egrep "$MYNICS"| sort
< fi

Any comment; welcome!

--Randall Badilla.