summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c7d1a8c)
raw | patch | inline | side by side (parent: c7d1a8c)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 29 Sep 2008 14:38:53 +0000 (14:38 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 29 Sep 2008 14:38:53 +0000 (14:38 +0000) |
tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh | [new file with mode: 0755] | patch | blob |
diff --git a/tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh b/tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh
--- /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
+