![]() ![]() |
crusader |
Subversion Repositories: |
| Line No. | Rev | Author | Line |
|---|---|---|---|
| 1 | 1 | simandl | #!/bin/bash |
| 2 | |
||
| 3 | PATH=/opt/rrdtool/bin:$PATH:/sbin |
||
| 4 | |
||
| 5 | logdir="/var/statistiky" |
||
| 6 | file="${logdir}/zebra.rrd" |
||
| 7 | |
||
| 8 | now=`date +%s` |
||
| 9 | |
||
| 10 | if [ ! -f $file ] ; then |
||
| 11 | # posledni hodina vsechny hodnoty |
||
| 12 | # posledni den prumery z deseti hodnot = 10minutove prumery |
||
| 13 | # posledni tyden hodinove prumery |
||
| 14 | rrdtool create $file --step 60 --start $now \ |
||
| 15 | DS:count:GAUGE:120:0:U \ |
||
| 16 | RRA:AVERAGE:0.5:1:60 \ |
||
| 17 | RRA:AVERAGE:0.5:10:144 \ |
||
| 18 | RRA:AVERAGE:0.5:60:168 |
||
| 19 | fi |
||
| 20 | |