[hobbit] ifstat and hobbitclient-sunos.sh

Eric Meddaugh etmsys at rit.edu
Tue Oct 10 20:44:55 CEST 2006


I saw this too with some of our clients, so this is what I did for that:

   echo "[ifstat]"
   LINE=`/sbin/ifconfig -a | /bin/egrep RUNNING | /bin/awk -F':'
'{printf $1"\n"}' | /bin/sort -u | /bin/awk '{printf $1"|"}'`
   /usr/bin/kstat -p -s '[or]bytes64' | sort | egrep "${LINE}"

This way it only grabs the interfaces that are running.

---Eric

-----Original Message-----
From: Dominique Frise [mailto:Dominique.Frise at unil.ch] 
Sent: Tuesday, October 10, 2006 09:18
To: hobbit at hswn.dk
Subject: [hobbit] ifstat and hobbitclient-sunos.sh

Hi,

The command "/usr/bin/kstat -p -s '[or]bytes64' | sort" for ifstat in 
hobbitclient-sunos.sh collects statistics for wrsmd (WCI Remote Shared
Memory 
(WRSM) DLPI driver), which is wrong.

Example on a Solaris 9 client:

[bb at eliot bin]$ /usr/bin/kstat -p -s '[or]bytes64' | sort
eri:0:eri0:obytes64     363076089018
eri:0:eri0:rbytes64     15860668051
ge:0:ge0:obytes64       0
ge:0:ge0:rbytes64       0
wrsmd:0:wrsmd0:obytes64 0
wrsmd:0:wrsmd0:rbytes64 0
wrsmd:10:wrsmd10:obytes64       0
wrsmd:10:wrsmd10:rbytes64       0
wrsmd:11:wrsmd11:obytes64       0
wrsmd:11:wrsmd11:rbytes64       0
wrsmd:12:wrsmd12:obytes64       0
wrsmd:12:wrsmd12:rbytes64       0
wrsmd:13:wrsmd13:obytes64       0
wrsmd:13:wrsmd13:rbytes64       0
wrsmd:14:wrsmd14:obytes64       0
wrsmd:14:wrsmd14:rbytes64       0
wrsmd:15:wrsmd15:obytes64       0
wrsmd:15:wrsmd15:rbytes64       0
wrsmd:1:wrsmd1:obytes64 0
wrsmd:1:wrsmd1:rbytes64 0
wrsmd:2:wrsmd2:obytes64 0
wrsmd:2:wrsmd2:rbytes64 0
wrsmd:3:wrsmd3:obytes64 0
wrsmd:3:wrsmd3:rbytes64 0
wrsmd:4:wrsmd4:obytes64 0
wrsmd:4:wrsmd4:rbytes64 0
wrsmd:5:wrsmd5:obytes64 0
wrsmd:5:wrsmd5:rbytes64 0
wrsmd:6:wrsmd6:obytes64 0
wrsmd:6:wrsmd6:rbytes64 0
wrsmd:7:wrsmd7:obytes64 0
wrsmd:7:wrsmd7:rbytes64 0
wrsmd:8:wrsmd8:obytes64 0
wrsmd:8:wrsmd8:rbytes64 0
wrsmd:9:wrsmd9:obytes64 0
wrsmd:9:wrsmd9:rbytes64 0


A quick fix is to replace it with "/usr/bin/kstat -p -s '[or]bytes64' |
grep -v 
wrsmd | sort"


Dominique
UNIL - University of Lausanne

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk





More information about the Xymon mailing list