#!/bin/rc NET=$1 start=`{cat /sys/log/mon/monnet.$NET | sed 1q | awk '{a=$1; print $1}'} # end is one day later in seconds end=`{echo $start+86400 | bc} day=`{date | awk '{print $3 "-" $2}'} start=`{ echo $start-200|bc} cat /sys/log/mon/monnet.$NET | /usr/gdiaz/bin/386/drawvars -T -t 'Network traffic '^$day -s $start -e $end -m 1200 -v t,In,Out | topng > /usr/web/stats/traffic.png