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

## system statistics

<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-cpu-week.png --imginfo '<IMG SRC=/rrd-img/%s WIDTH=%lu HEIGHT=%lu >' --lazy -i -a PNG --title="CPU Usage (Week)" -v Percent -u 100 --rigid -s -1week 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-cpu-month.png --imginfo '<IMG SRC=/rrd-img/%s WIDTH=%lu HEIGHT=%lu >' --lazy -i -a PNG --title="CPU Usage (Month)" -v Percent -u 100 --rigid -s -1month 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-cpu-year.png --imginfo '<IMG SRC=/rrd-img/%s WIDTH=%lu HEIGHT=%lu >' --lazy -i -a PNG --title="CPU Usage (Year)" -v Percent -u 100 --rigid -s -1year 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">