From 013f8ad3c22c685dc4043b16af9ec75ef2390916 Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 29 Sep 2008 14:38:53 +0000 Subject: [PATCH] initial git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1545 a5681a0c-68f1-0310-ab6d-d61299d08faa --- .../lisa2008/rrd-by-example/ex/catch-fetch.sh | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh 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 index 00000000..d0b4109d --- /dev/null +++ b/tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh @@ -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 + -- 2.30.2