1 | 29 | simandl | #!/usr/bin/env sh |
2 | | | |
3 | | | . ../../settings |
4 | | | |
5 | | | DEV=$1 |
6 | | | MAX=$2 |
7 | | | |
8 | | | SECS=`date +%s` |
9 | | | |
10 | | | MODNAME=`pwd|sed -e "s/.*\///g" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` |
11 | | | |
12 | | | if [ "$DEV" = "" ] || [ "$MAX" = "" ] ; then echo "arguments missing!" ; else |
13 | | | |
14 | | | echo $SECS $MODNAME: setting up database $DEV.rrd for values [0..$MAX] |
15 | | | |
16 | | | $BINPATH/rrdtool create rrd/$DEV.rrd --step 10 \ |
17 | | | DS:freq:GAUGE:300:U:$MAX \ |
18 | | | DS:mcs:GAUGE:300:U:$MAX \ |
19 | | | DS:signal:GAUGE:300:U:$MAX \ |
20 | | | DS:txsec:GAUGE:300:U:$MAX \ |
21 | | | DS:rssi:GAUGE:300:U:$MAX \ |
22 | | | DS:rate:GAUGE:300:U:$MAX \ |
23 | | | DS:noise:GAUGE:300:U:$MAX \ |
24 | | | RRA:AVERAGE:0:1:720 \ |
25 | | | RRA:AVERAGE:0.3:6:2880 \ |
26 | | | RRA:AVERAGE:0.3:60:2016 \ |
27 | | | RRA:AVERAGE:0.3:360:1488 \ |
28 | | | RRA:AVERAGE:0.3:4320:1460 \ |
29 | | | RRA:MAX:0.3:6:2880 \ |
30 | | | RRA:MAX:0.3:60:2016 \ |
31 | | | RRA:MAX:0.3:360:1488 \ |
32 | | | RRA:MAX:0.3:4320:1460 |
33 | | | fi |