[rrd-users] Memory usage - script help

spiekey spiekey at hotmail.com
Sat Mar 2 17:51:23 MET 2002


Hello!
I have a script and i dont know why it wont work (the Variable stays emty
for some reason

rrdtool create localmem.rrd         \
            DS:memory:COUNTER:600:U:U   \
            RRA:AVERAGE:0.5:1:600      \
            RRA:AVERAGE:0.5:6:700      \
            RRA:AVERAGE:0.5:24:775     \
            RRA:AVERAGE:0.5:288:797    \
            RRA:MAX:0.5:1:600          \
            RRA:MAX:0.5:6:700          \
            RRA:MAX:0.5:24:775         \
            RRA:MAX:0.5:288:797

SCRIPT:
==========================
#!/bin/sh
while (true)
do
  BYTES_MEM=` snmpget -Ov localhost public
enterprises.ucdavis.memory.memAvailReal.0 | awk -- ' BEGIN { FS = " " }
{print $2 } '`
  DATE=`date +%s`

echo $BYTES_MEM  # This variable is totally emtpy!

 /tmp/ut-server/files/rrdtool-1.0.33/src/rrdtool update localmem.rrd
$DATE:$BYTES_MEM
  echo $DATE - $BYTES_MEM

./rrdtool graph localmemory.gif --start -86400 \
            DEF:memAvailReal=localmem.rrd:memory:AVERAGE \
            AREA:memAvailReal#00FF00:"In traffic" \

cp localmem.gif /usr/local/httpd/htdocs/admin

  sleep 10
done

==============================


Thank you !!

Mario Ohnewald




--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list