[rrd-users] plot question: cpu utilization, 60-80% yellow, 80-100% red

Stefan Parvu stefanparvu14 at yahoo.com
Sat Jun 26 14:21:31 CEST 2010


the final  bits:
http://www.systemdatarecorder.org/imgs/cpumem_last.png

and the code:
${REPORT_BIN}/rrdtool graph ${REPORT_DOCROOT}/$3/sys/cpumem_$tag.png --start "$1" --end "$2" \
--font TITLE:10:Arial \
--font LEGEND:7:. \
--upper-limit 100 \
--height 100 \
--width 410 \
--vertical-label "% Utilisation" \
--title "$3 - $graph_title" \
--color=BACK#CCCCCC \
--step 60 \
--units-exponent 0 \
DEF:my_cpuu=sys.$3.rrd:cpuu:AVERAGE \
DEF:my_memu=sys.$3.rrd:memu:AVERAGE \
AREA:60 \
AREA:20#FFFF99BB::STACK \
AREA:20#FFCC99BB::STACK \
\
AREA:my_cpuu#00ff00:"CPU Util" \
GPRINT:my_cpuu:MAX:"Max %2.2lf" \
GPRINT:my_cpuu:AVERAGE:"Average %2.2lf\n" \
\
LINE1:my_memu#0000ff:"Mem Util" \
GPRINT:my_memu:MAX:"Max %2.2lf" \
GPRINT:my_memu:AVERAGE:"Average %2.2lf\n"

thanks to Alex for help and suggestions.

stefan



More information about the rrd-users mailing list