[rrd-users] Re: Memory usage - script help

Serge Maandag serge.maandag at staff.zeelandnet.nl
Sun Mar 3 11:29:13 MET 2002


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:spiekey at hotmail.com]
Sent: zaterdag 2 maart 2002 17:51
To: rrd-users at list.ee.ethz.ch
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: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


--
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