[rrd-users] graphing problem

Graham Lillico graham_lillico at hotmail.com
Wed May 22 13:05:06 MEST 2002


Hi,

I'm trying to get a script to monitor my memory/swap status and I'm having 
problem with the graph.

I'm using freeBSD 4.5 and snmpget to get the required information I want.

I'm getting with values returned  as

enterprises.ucdavis.memory.memTotalReal.0  = 46072
enterprises.ucdavis.memory.memAvailReal.0  = 5024
enterprises.ucdavis.memory.memTotalSwap.0  = 134736
enterprises.ucdavis.memory.memAvailSwap.0  = 88916
enterprises.ucdavis.memory.memTotalFree.0  = 8680

However when I create the graph using the following

$RRDTOOL graph img/$HOST-memory.day.png --start -86400  \
  --title "Daily Statistics for $HOST" \
  --vertical-label "Size (bytes)" -l 0 -b 1024 \
    DEF:phys_tot=rrd/$HOST-memory.rrd:phys_size:MAX \
    DEF:phys_avail=rrd/$HOST-memory.rrd:phys_avail:MAX \
    DEF:swap_tot=rrd/$HOST-memory.rrd:swap_size:MAX \
    DEF:swap_avail=rrd/$HOST-memory.rrd:swap_avail:MAX \
    DEF:mem_free=rrd/$HOST-memory.rrd:mem_free:MAX \
    CDEF:p_phys_tot=phys_tot,1024,* \
    CDEF:p_phys_avail=phys_avail,1024,* \
    CDEF:p_swap_tot=swap_tot,1024,* \
    CDEF:p_swap_avail=swap_avail,1024,* \
    CDEF:p_mem_free=mem_free,1024,* \
    CDEF:pr_phys_tot=phys_tot,1024,/ \
    CDEF:pr_phys_avail=phys_avail,1024,/ \
    CDEF:pr_swap_tot=swap_tot,1024,/ \
    CDEF:pr_swap_avail=swap_avail,1024,/ \
    CDEF:pr_mem_free=mem_free,1024,/ \
    AREA:p_phys_tot#00FF00:"Total Physical memory         " \
    GPRINT:pr_phys_tot:MAX:" %5.2lf MB\n"       \
    LINE2:p_phys_avail#0000FF:"Available Physical memory     " \
    GPRINT:pr_phys_avail:MAX:" %5.2lf MB\n"     \
    LINE2:p_swap_tot#9900FF:"Total Swap memory             " \
    GPRINT:pr_swap_tot:MAX:" %5.2lf MB\n"       \
    LINE2:p_swap_avail#FF00FF:"Available swap memory         " \
    GPRINT:pr_swap_avail:MAX:" %5.2lf MB\n"     \
    LINE2:p_mem_free#FF0000:"Total Free memory             " \
    GPRINT:pr_mem_free:MAX:" %5.2lf MB\n"       \
    COMMENT:"Graphic created at $DATE_STRING.\r"

I'm getting values ofm

memTotalReal.0  = 58365.18
memAvailReal.0  = 56145.97
memTotalSwap.0  = 0.00
memAvailSwap.0  = 27251.13
memTotalFree.0  = 56145.97

Which to me are wrong,  Does anyone have any idea what I am doing wrong? As 
this is driving me crazy.

Regards

Graham Lillico




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

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