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

## wlan statistics: <RRD::CV ifname>

<RRD::GRAPH ../rrd-img/<RRD::CV::PATH ifname>-snr-day.png --imginfo '' --lazy -i -a PNG --title="Signal/Noise Ratio (SNR) (Day)" -v dBm -l 0 DEF:s=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:signal:AVERAGE DEF:n=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:noise:AVERAGE CDEF:snr=s,n,- AREA:snr#FF1111:SNR LINE1:snr#990000 GPRINT:snr:MIN:" Min\: %2.lf" GPRINT:snr:MAX:" Max\: %2.lf" GPRINT:snr:AVERAGE:" Avg\: %4.1lf" GPRINT:snr:LAST:" Current\: %2.lf dB" HRULE:0#000000>

<RRD::GRAPH ../rrd-img/<RRD::CV::PATH ifname>-sn-day.png --imginfo '' --lazy -i -a PNG --title="Signal & Noise (Day)" -v dBm DEF:signal=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:signal:AVERAGE DEF:noise=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:noise:AVERAGE LINE2:signal#FF9900:Signal GPRINT:signal:MIN:" Min\: %4.lf" GPRINT:signal:MAX:" Max\: %4.lf" GPRINT:signal:AVERAGE:" Avg\: %6.1lf" GPRINT:signal:LAST:" Current\: %4.lf dBm\n" LINE2:noise#6F4300:Noise GPRINT:noise:MIN:" Min\: %4.lf" GPRINT:noise:MAX:" Max\: %4.lf" GPRINT:noise:AVERAGE:" Avg\: %6.1lf" GPRINT:noise:LAST:" Current\: %4.lf dBm">

<RRD::GRAPH ../rrd-img/<RRD::CV::PATH ifname>-qual-day.png --imginfo '' --lazy -i -a PNG --title="Link Quality (Day)" -v "Unknown Unit" -l 0 DEF:qual=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:qual:AVERAGE AREA:qual#1111FF:Quality LINE1:qual#000099 GPRINT:qual:MIN:" Min\: %2.lf" GPRINT:qual:MAX:" Max\: %2.lf" GPRINT:qual:AVERAGE:" Avg\: %4.1lf" GPRINT:qual:LAST:" Current\: %2.lf">

<RRD::GRAPH ../rrd-img/<RRD::CV::PATH ifname>-rate-day.png --imginfo '' --lazy -i -a PNG --title="Bit Rate (Day)" -y 1:1 -l 0 -u 11 --rigid -v "Mbps" DEF:rate=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:rate:AVERAGE AREA:rate#666666:"Link Rate" LINE1:rate#000000 GPRINT:rate:MIN:" Min\: %4.1lf" GPRINT:rate:MAX:" Max\: %4.1lf" GPRINT:rate:AVERAGE:" Avg\: %4.1lf" GPRINT:rate:LAST:" Current\: %4.1lf Mbits/s\n">

<RRD::GRAPH ../rrd-img/<RRD::CV::PATH ifname>-pkg-in-day.png --imginfo '' --lazy -i -a PNG --title="Incoming Packets (Day)" -l 0 -v "Number of Packets" DEF:pkg=/var/lib/rrd/traffic-<RRD::CV::PATH ifname>.rrd:pkg-in:AVERAGE DEF:err=/var/lib/rrd/traffic-<RRD::CV::PATH ifname>.rrd:pkg-in-err:AVERAGE DEF:drop=/var/lib/rrd/traffic-<RRD::CV::PATH ifname>.rrd:pkg-in-drop:AVERAGE DEF:nwid=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:disc-nwid:AVERAGE DEF:crypt=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:disc-crypt:AVERAGE DEF:frag=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:disc-frag:AVERAGE AREA:pkg#006600:"Received" GPRINT:pkg:MIN:" Min\: %4.1lf" GPRINT:pkg:MAX:" Max\: %4.1lf" GPRINT:pkg:AVERAGE:" Avg\: %4.1lf" GPRINT:pkg:LAST:" Current\: %4.1lf\n" STACK:err#FF0000:"Errors" GPRINT:err:MIN:" Min\: %4.1lf" GPRINT:err:MAX:" Max\: %4.1lf" GPRINT:err:AVERAGE:" Avg\: %4.1lf" GPRINT:err:LAST:" Current\: %4.1lf\n" STACK:drop#0000FF:"Dropped" GPRINT:drop:MIN:" Min\: %4.1lf" GPRINT:drop:MAX:" Max\: %4.1lf" GPRINT:drop:AVERAGE:" Avg\: %4.1lf" GPRINT:drop:LAST:" Current\: %4.1lf\n" STACK:nwid#FF891A:"Invalid Network" GPRINT:nwid:MIN:" Min\: %4.1lf" GPRINT:nwid:MAX:" Max\: %4.1lf" GPRINT:nwid:AVERAGE:" Avg\: %4.1lf" GPRINT:nwid:LAST:" Current\: %4.1lf\n" STACK:crypt#5CF4FF:"Invalid Crypt" GPRINT:crypt:MIN:" Min\: %4.1lf" GPRINT:crypt:MAX:" Max\: %4.1lf" GPRINT:crypt:AVERAGE:" Avg\: %4.1lf" GPRINT:crypt:LAST:" Current\: %4.1lf\n" STACK:frag#FF3BF5:"Infalid Frag" GPRINT:frag:MIN:" Min\: %4.1lf" GPRINT:frag:MAX:" Max\: %4.1lf" GPRINT:frag:AVERAGE:" Avg\: %4.1lf" GPRINT:frag:LAST:" Current\: %4.1lf\n">

<RRD::GRAPH ../rrd-img/<RRD::CV::PATH ifname>-pkg-out-day.png --imginfo '' -i --lazy -a PNG --title="Outgoing Packets (Day)" -l 0 -v "Number of Packets" DEF:pkg=/var/lib/rrd/traffic-<RRD::CV::PATH ifname>.rrd:pkg-out:AVERAGE DEF:err=/var/lib/rrd/traffic-<RRD::CV::PATH ifname>.rrd:pkg-out-err:AVERAGE DEF:drop=/var/lib/rrd/traffic-<RRD::CV::PATH ifname>.rrd:pkg-out-drop:AVERAGE DEF:retry=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:disc-retry:AVERAGE DEF:misc=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:disc-misc:AVERAGE DEF:beacon=/var/lib/rrd/wlan-<RRD::CV::PATH ifname>.rrd:missed-beacon:AVERAGE AREA:pkg#006600:"Sent" GPRINT:pkg:MIN:" Min\: %4.1lf" GPRINT:pkg:MAX:" Max\: %4.1lf" GPRINT:pkg:AVERAGE:" Avg\: %4.1lf" GPRINT:pkg:LAST:" Current\: %4.1lf\n" STACK:err#FF0000:"Errors" GPRINT:err:MIN:" Min\: %4.1lf" GPRINT:err:MAX:" Max\: %4.1lf" GPRINT:err:AVERAGE:" Avg\: %4.1lf" GPRINT:err:LAST:" Current\: %4.1lf\n" STACK:drop#0000FF:"Dropped" GPRINT:drop:MIN:" Min\: %4.1lf" GPRINT:drop:MAX:" Max\: %4.1lf" GPRINT:drop:AVERAGE:" Avg\: %4.1lf" GPRINT:drop:LAST:" Current\: %4.1lf\n" STACK:retry#FF891A:"Excessive Retries" GPRINT:retry:MIN:" Min\: %4.1lf" GPRINT:retry:MAX:" Max\: %4.1lf" GPRINT:retry:AVERAGE:" Avg\: %4.1lf" GPRINT:retry:LAST:" Current\: %4.1lf\n" STACK:misc#F2FF00:"Invalid Misc" GPRINT:misc:MIN:" Min\: %4.1lf" GPRINT:misc:MAX:" Max\: %4.1lf" GPRINT:misc:AVERAGE:" Avg\: %4.1lf" GPRINT:misc:LAST:" Current\: %4.1lf\n" STACK:beacon#FF3BF5:"Missed Beacon" GPRINT:beacon:MIN:" Min\: %4.1lf" GPRINT:beacon:MAX:" Max\: %4.1lf" GPRINT:beacon:AVERAGE:" Avg\: %4.1lf" GPRINT:beacon:LAST:" Current\: %4.1lf\n">