Code

initial
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 29 Sep 2008 14:38:53 +0000 (14:38 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 29 Sep 2008 14:38:53 +0000 (14:38 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1545 a5681a0c-68f1-0310-ab6d-d61299d08faa

tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh [new file with mode: 0755]

diff --git a/tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh b/tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh
new file mode 100755 (executable)
index 0000000..d0b4109
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+export PATH=/scratch/rrd4/bin:$PATH
+R=rrdtool
+$R create x.rrd \
+   --step=300 \
+   --start=1199999699 \
+   DS:temperature:GAUGE:600:-40:100 \
+   RRA:AVERAGE:0.5:1:2 \
+   RRA:AVERAGE:0.5:2:3
+
+#!/bin/sh
+R=rrdtool
+u(){
+ $R update x.rrd $1
+}
+
+u 1199999700:00 
+u 1200000000:10
+u 1200000300:20
+u 1200000600:30
+u 1200000900:40
+u 1200001200:50
+
+set -x 
+
+$R fetch x.rrd -r300 -s1200000000 -e1200000900 AVERAGE
+$R fetch x.rrd -r300 -s1200000600 -e1200000900 AVERAGE
+