[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] iostat cpu infos




Le 21 juin 06 à 13:29, Nicolas Dorfsman a écrit :

How could I put theses figures into a RRD file, and then use the file with [vmstat1] wonderful definition ?
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk


Hum.

1) I've modified hobbitclient-sunos.sh :

if test -f $BBTMP/hobbit_iostatcpu.$MACHINEDOTS; then echo "[iostatcpu]"; tail -1 $BBTMP/hobbit_iostatcpu.$MACHINEDOTS; rm -f $BBTMP/hobbit_iostatcpu.$MACHINEDOTS; fi ### --> tail -1 instead of cat

2) I've added (re-modified) hobbitclient-aix.sh :


nohup sh -c "iostat -t 300 2 1>$BBTMP/hobbit_iostatcpu.$MACHINEDOTS.$ $ 2>&1; mv $BBTMP/hobbit_iostatcpu.$MACHINEDOTS.$$ $BBTMP/ hobbit_iostatcpu.$MACHINEDOTS"</dev/null >/dev/null 2>&1 &
...snip...


if test -f $BBTMP/hobbit_iostatcpu.$MACHINEDOTS; then echo "[iostatcpu]"; tail -1 $BBTMP/hobbit_iostatcpu.$MACHINEDOTS | awk '{printf("%s %s %s %s\n"),$3,$4,$6,$5}'; rm -f $BBTMP/ hobbit_iostatcpu.$MACHINEDOTS; fi ### ---> tail -1 and awk to print the same infos in the same order

3) I've added iostatcpu in TEST2RRD :

TEST2RRD="cpu=la......iostatcpu=ncv"

and added in hobbitserver.cfg :

NCV_iostatcpu="cpu_usr:GAUGE,cpu_sys:GAUGE,cpu_wait:GAUGE,cpu_idl:GAUGE"

4) I've renamed [vmstat1] into [iostatcpu]



But...there's no rrd file created.  What else do I need to do ?