#!/usr/bin/rrdcgi <RRD::GOODFOR -600>
<RRD::INCLUDE nav.inc.html>

## system statistics

<RRD::GRAPH ../rrd-img/sys-mem-day.png --imginfo '<IMG SRC=/rrd-img/%s WIDTH=%lu HEIGHT=%lu >' --lazy -i -a PNG --title="Memory Usage (Day)" -v Byte --base 1000 -l -0 -u 64000000 --rigid DEF:used=/var/lib/rrd/system.rrd:mem-used:AVERAGE DEF:free=/var/lib/rrd/system.rrd:mem-free:AVERAGE DEF:cache=/var/lib/rrd/system.rrd:mem-cache:AVERAGE AREA:used#1111FF:Used GPRINT:used:MIN:" Min\: %3.1lf%s " GPRINT:used:MAX:" Max\: %3.1lf%S" GPRINT:used:AVERAGE:" Avg\: %3.1lf%S" GPRINT:used:LAST:" Current\: %3.1lf%SByte\n" STACK:free#00FF00:Free GPRINT:free:MIN:" Min\: %3.1lf%S" GPRINT:free:MAX:" Max\: %3.1lf%S" GPRINT:free:AVERAGE:" Avg\: %3.1lf%S" GPRINT:free:LAST:" Current\: %3.1lf%SByte\n" LINE2:cache#000000:Cached GPRINT:cache:MIN:" Min\: %3.1lf%s " GPRINT:cache:MAX:" Max\: %3.1lf%S" GPRINT:cache:AVERAGE:" Avg\: %3.1lf%S" GPRINT:cache:LAST:" Current\: %3.1lf%SByte\n">

<RRD::GRAPH ../rrd-img/sys-cpu-day.png --imginfo '<IMG SRC=/rrd-img/%s WIDTH=%lu HEIGHT=%lu >' --lazy -i -a PNG --title="CPU Usage (Day)" -v Percent -u 100 --rigid DEF:user=/var/lib/rrd/system.rrd:user:AVERAGE DEF:nice=/var/lib/rrd/system.rrd:nice:AVERAGE DEF:system=/var/lib/rrd/system.rrd:system:AVERAGE AREA:system#FF1111:System GPRINT:system:MAX:" Max\: %3.lf" GPRINT:system:AVERAGE:" Avg\: %3.lf" GPRINT:system:LAST:" Current\: %3.lf\n" STACK:nice#1111FF:Nice GPRINT:nice:MAX:" Max\: %3.lf" GPRINT:nice:AVERAGE:" Avg\: %3.lf" GPRINT:nice:LAST:" Current\: %3.lf\n" STACK:user#11EE11:User GPRINT:user:MAX:" Max\: %3.lf" GPRINT:user:AVERAGE:" Avg\: %3.lf" GPRINT:user:LAST:" Current\: %3.lf">

<RRD::GRAPH ../rrd-img/sys-load-day.png --imginfo '<IMG SRC=/rrd-img/%s WIDTH=%lu HEIGHT=%lu >' --lazy -i -a PNG --title="Load Average (Number of Processes in Run Queue) (Day)" -v Number -u 1 DEF:l=/var/lib/rrd/system.rrd:load:AVERAGE AREA:l#11EE11:"Load" LINE1:l#009900 GPRINT:l:MAX:" Max\: %3.2lf" GPRINT:l:AVERAGE:" Avg\: %3.2lf" GPRINT:l:LAST:" Current\: %3.2lf">

<RRD::GRAPH ../rrd-img/sys-df-root-day.png --imginfo '<IMG SRC=/rrd-img/%s WIDTH=%lu HEIGHT=%lu >' --lazy -i -a PNG --title="Free Space in Flash (Day)" -v Byte -l 0 -b 1024 DEF:du=/var/lib/rrd/system.rrd:du-root:AVERAGE DEF:df=/var/lib/rrd/system.rrd:df-root:AVERAGE CDEF:used=du,1024,* CDEF:free=df,1024,* AREA:used#EE1111:"Used" GPRINT:used:MAX:" Max\: %3.2lf%s" GPRINT:used:AVERAGE:" Avg\: %3.2lf%S" GPRINT:used:LAST:" Current\: %3.2lf%SByte\n" STACK:free#11EE11:"Free" GPRINT:free:MAX:" Max\: %3.2lf%s" GPRINT:free:AVERAGE:" Avg\: %3.2lf%S" GPRINT:free:LAST:" Current\: %3.2lf%SByte" >mv

<RRD::GRAPH ../rrd-img/sys-df-tmp-day.png --imginfo '<IMG SRC=/rrd-img/%s WIDTH=%lu HEIGHT=%lu >' --lazy -i -a PNG --title="Free Space in /tmp (Day)" -v Byte -l 0 -b 1024 DEF:du=/var/lib/rrd/system.rrd:du-tmp:AVERAGE DEF:df=/var/lib/rrd/system.rrd:df-tmp:AVERAGE CDEF:used=du,1024,* CDEF:free=df,1024,* AREA:used#EE1111:"Used" GPRINT:used:MAX:" Max\: %3.2lf%s" GPRINT:used:AVERAGE:" Avg\: %3.2lf%S" GPRINT:used:LAST:" Current\: %3.2lf%SByte\n" STACK:free#11EE11:"Free" GPRINT:free:MAX:" Max\: %3.2lf%s" GPRINT:free:AVERAGE:" Avg\: %3.2lf%S" GPRINT:free:LAST:" Current\: %3.2lfByte%S" >