#!/bin/bash RRDTOOL=/usr/bin/rrdtool STATSDIR=/var/www/wan-stats/ # DS : Name : Type : Heartbeat : Min : Max # RRA : AVERAGE : Xff : Steps : Rows # 5 minutes is 300 seconds # 1 Day is 288 5-minute intervals # 1 Week is 2016 5-minute intervals $RRDTOOL create "net.rrd" --step 300 \ DS:eth0in:GAUGE:1200:U:U \ DS:eth0out:GAUGE:1200:U:U \ DS:eth1in:GAUGE:1200:U:U \ DS:eth1out:GAUGE:1200:U:U \ RRA:AVERAGE:0.5:1:288 \ RRA:AVERAGE:0.5:1:2016 mv -f "net.rrd" $STATSDIR