![]() ![]() |
crusader |
Subversion Repositories: |
Compare with Previous - Blame - Download
#!/bin/bashdevice=$1timediff=$2suffix=$3popis=$4PATH=$PATH:/opt/rrdtool/bindatadir=/var/statistikycd $datadirnow=`date +%s`rrdtool graph ${device}_${suffix}.png --imgformat PNG --start `expr $now - ${timediff}` --end $now \DEF:inbps=${device}.rrd:input:AVERAGE \DEF:outbps=${device}.rrd:output:AVERAGE \CDEF:inbpsreal=inbps,LOG \LINE2:inbpsreal#FF0000:"In traffic" \CDEF:outbps2=outbps,LOG \LINE2:outbps2#0000FF:"Out traffic" \--logarithmic \--alt-autoscale \--vertical-label Bytes/s \--height 200 \--title "${device} ${popis}"mv ${device}_${suffix}.png /var/www/htdocs/stat/img