does the command:

        snmpwalk localhost public enterprises.ucdavis.memory

on the command line give any output?

If not, snmpd may not be running, your community may be wrong or you
packet filter may be blocking you from connecting to udp port 161, to
name a few things.

b.t.w., your stepsize is 60 seconds, and you're updating your rrd every
10 seconds..

Serge Maandag.

-----Original Message-----
From: spiekey [mailto:[EMAIL PROTECTED]
Sent: zaterdag 2 maart 2002 17:51
To: [email protected]
Subject: [rrd-users] Memory usage - script help



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:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi


--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to