jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [diskio/] [makerrd] - Blame information for rev 1

 

Line No. Rev Author Line
11simandl#!/usr/bin/env sh
2 
3. ../../settings
4 
5DEV=$1
6 
7OS_TYPE=`uname`
8 
9SECS=`date +%s`
10 
11MODNAME=`pwd|sed -e "s/.*\///g" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
12 
13MAXTRANS=50000000
14MAXIO=50000
15 
16if [ "$DEV" = "" ] ; then echo "arguments missing!" ; else
17 
18 echo $SECS $MODNAME: setting up database $DEV.rrd for values [0..unknown]
19 
20 if [ $OS_TYPE = "Linux" ]; then
21 $BINPATH/rrdtool create rrd/$DEV.rrd --step 10 \
22 DS:racc:COUNTER:300:0:$MAXIO \
23 DS:rbyt:COUNTER:300:0:$MAXTRANS \
24 DS:wacc:COUNTER:300:0:$MAXIO \
25 DS:wbyt:COUNTER:300:0:$MAXTRANS \
26 RRA:AVERAGE:0:1:720 \
27 RRA:AVERAGE:0.3:6:2880 \
28 RRA:AVERAGE:0.3:60:2016 \
29 RRA:AVERAGE:0.3:360:1488 \
30 RRA:AVERAGE:0.3:4320:1460 \
31 RRA:MIN:0.3:6:2880 \
32 RRA:MIN:0.3:60:2016 \
33 RRA:MIN:0.3:360:1488 \
34 RRA:MIN:0.3:4320:1460 \
35 RRA:MAX:0.3:6:2880 \
36 RRA:MAX:0.3:60:2016 \
37 RRA:MAX:0.3:360:1488 \
38 RRA:MAX:0.3:4320:1460
39 
40 fi
41 if [ $OS_TYPE = "FreeBSD" -o $OS_TYPE = "NetBSD" -o $OS_TYPE = "OpenBSD" ]; then
42 $BINPATH/rrdtool create rrd/$DEV.rrd --step 10 \
43 DS:kbt:COUNTER:300:0:U \
44 DS:xfr:COUNTER:300:0:U \
45 DS:time:COUNTER:300:0:U \
46 DS:mb:COUNTER:300:0:U \
47 RRA:AVERAGE:0:1:720 \
48 RRA:AVERAGE:0.3:6:2880 \
49 RRA:AVERAGE:0.3:60:2016 \
50 RRA:AVERAGE:0.3:360:1488 \
51 RRA:AVERAGE:0.3:4320:1460 \
52 RRA:MIN:0.3:6:2880 \
53 RRA:MIN:0.3:60:2016 \
54 RRA:MIN:0.3:360:1488 \
55 RRA:MIN:0.3:4320:1460 \
56 RRA:MAX:0.3:6:2880 \
57 RRA:MAX:0.3:60:2016 \
58 RRA:MAX:0.3:360:1488 \
59 RRA:MAX:0.3:4320:1460
60 
61 fi
62 fi
63 
64# 2h -> 720 Werte alle 10sec
65# 2d = 48h -> 2880 Werte alle 1min (6*10sec)
66# 2w = 14d -> 2016 Werte alle 10min (60*10sec)
67# 2m = 62d -> 1488 Werte alle 1h (360*10sec)
68# 2y = 730d -> 1460 Werte alle 12h (4320*10sec)

Powered by WebSVN 2.2.1