[rrd-developers] Problem editing larrd-grapher.cgi for Big Brother

Jodie Kok jkok at gfs.com
Tue Oct 2 18:32:46 MEST 2001


Hello!

Background:
  At work, I use Big Brother to monitor our Sun servers.  The larrd tool is a component of this that is used to chart various historic statistics about these servers.  The file "larrd-grapher.cgi" (which resides in the apache/cgi-bin directory) specifies these charts.  The one I would like to edit is the "vmstat2" chart. 
  Currently, this chart contains a line graph which is the load average and 3 stacked area graphs which are 3 components of cpu usage (user, system and idle).  The problem is, the stacked area graphs are charted on a 0-to-1 scale, while the line graph can be much higher (20k, for example).  I would like to multiply the values of the area graphs by the maximum value of the line graph, so that the area graphs will be visible on large charts.

Current Code:
  Here's the code that gathers the values to plot:
            qq{-u 1.0},
            qq{DEF:avg=$host.la.rrd:la:AVERAGE},
            qq{CDEF:la=avg,100,/},
            #qq{DEF:max=la:MAX},
            qq{DEF:cpu_idl=$RRD:cpu_idl:AVERAGE},
            qq{CDEF:cpu_idl2=cpu_idl,100,/},
            qq{CDEF:cpu_idl3=cpu_idl2,2,*},
            qq{DEF:cpu_usr=$RRD:cpu_usr:AVERAGE},
            qq{CDEF:cpu_usr2=cpu_usr,100,/},
            qq{CDEF:cpu_usr3=cpu_usr2,2,*},
            qq{DEF:cpu_sys=$RRD:cpu_sys:AVERAGE},
            qq{CDEF:cpu_sys2=cpu_sys,100,/},
            qq{CDEF:cpu_sys3=cpu_sys2,2,*},
            qq{AREA:cpu_sys3#FF0000:System},
            qq{STACK:cpu_usr3#FFFF00:User},
            qq{STACK:cpu_idl3#00FF00:Idle},
            qq{LINE1:la#000099:Load Average},
            qq{COMMENT:Looking for max},
            qq{GPRINT:la:MAX:"Max %6.0lf"},

The commented line fails, no matter how I write it (la:MAX, $RRD:la:MAX, $host.la.rrd:la:MAX).  The last line, however, works properly.  

Question:
Is there anyway to get the maximum value of la and use it in other calculations?  What I mainly want to do is something like the following:
qq{CDEF:cup_idl3=cpu_idl2,<insert max value here>,*},

  Help!  Thanks!
-Jodie Kok

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



More information about the rrd-developers mailing list