#!/bin/bash device=/var/statistiky/zebra PATH=$PATH:/opt/rrdtool/bin now=`date +%s` function make_obr() # $1 ... device # $2 ... timediff # $3 ... suffix # $4 ... popis { local device=$1 local timediff=$2 local suffix=$3 local popis=$4 if [ $# -lt 4 ] then echo "ERROR: function make_obr - Malo parametru" return 1 fi rrdtool graph ${device}_${suffix}.png --imgformat PNG --start `expr $now - ${timediff}` --end $now \ DEF:routes=${device}.rrd:count:AVERAGE \ LINE2:routes#0000FF:"routes" \ --vertical-label Pocet \ --height 200 \ --title "${popis}" mv ${device}_${suffix}.png /var/www/htdocs/stat/img } make_obr $device 86400 1den "pocet rout behem posledniho dne" make_obr $device 604800 tyden "pocet rout behem posledniho tydne" WebSVN - crusader - Blame - Rev 1 - /trunk/statistiky/opt/statistiky/monitor_zebra/makeobr_zebra.sh
  jablonka.czprosek.czf

crusader

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

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1