jablonka.czprosek.czf

crusader

Subversion Repositories:
[/] [trunk/] [statistiky/] [opt/] [statistiky/] [makeobr.sh.test] - Blame information for rev 1

 

Line No. Rev Author Line
11simandl#!/bin/bash
2 
3device=$1
4timediff=$2
5suffix=$3
6popis=$4
7 
8PATH=$PATH:/opt/rrdtool/bin
9 
10datadir=/var/statistiky
11 
12cd $datadir
13 
14now=`date +%s`
15 
16rrdtool graph ${device}_${suffix}.png --imgformat PNG --start `expr $now - ${timediff}` --end $now \
17 DEF:inbps=${device}.rrd:input:AVERAGE \
18 DEF:outbps=${device}.rrd:output:AVERAGE \
19 CDEF:inbpsreal=inbps,LOG \
20 LINE2:inbpsreal#FF0000:"In traffic" \
21 CDEF:outbps2=outbps,LOG \
22 LINE2:outbps2#0000FF:"Out traffic" \
23 --logarithmic \
24 --alt-autoscale \
25 --vertical-label Bytes/s \
26 --height 200 \
27 --title "${device} ${popis}"
28 
29mv ${device}_${suffix}.png /var/www/htdocs/stat/img

Powered by WebSVN 2.2.1