root/lm-sensors/trunk/prog/rrd/sens_create_rrd

Revision 5163, 1.7 KB (checked in by khali, 4 years ago)

Patch from Aurelien Jarno:

I have just noticed that the FSF address is the old one in all files
except COPYING. Please find a patch below to fix that.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/bin/sh
2#
3#    sens_create_rrd -
4#       Create a sensors rrd database of 14 sensor readings
5#       at 5 minute intervals for 1 week.
6#
7#    Copyright 2001 Mark D. Studebaker <mdsxyz123@yahoo.com>
8#
9#    This program is free software; you can redistribute it and/or modify
10#    it under the terms of the GNU General Public License as published by
11#    the Free Software Foundation; either version 2 of the License, or
12#    (at your option) any later version.
13#
14#    This program is distributed in the hope that it will be useful,
15#    but WITHOUT ANY WARRANTY; without even the implied warranty of
16#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17#    GNU General Public License for more details.
18#
19#    You should have received a copy of the GNU General Public License
20#    along with this program; if not, write to the Free Software
21#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22#    MA 02110-1301 USA.
23#
24RRDPATH=/usr/bin
25RRDB=$1
26#Heartbeat 15 minutes
27HB=900
28#Rows 12 * 24 * 7 = 1 week of every 5 minutes
29RW=2016
30
31if [ $# -ne 1 ]
32then
33        echo usage: $0 database.rrd
34        exit 1
35fi
36
37DIR=`dirname $1`
38if [ ! -w $DIR ]
39then
40        echo $0: directory $DIR not present or not writable
41        exit 1
42fi
43
44$RRDPATH/rrdtool create $RRDB --step 300 \
45        DS:fan1:GAUGE:${HB}:0:12000 \
46        DS:fan2:GAUGE:${HB}:0:12000 \
47        DS:fan3:GAUGE:${HB}:0:12000 \
48        DS:temp1:GAUGE:${HB}:-25:250 \
49        DS:temp2:GAUGE:${HB}:-25:250 \
50        DS:temp3:GAUGE:${HB}:-25:250 \
51        DS:in0:GAUGE:${HB}:-25:25 \
52        DS:in1:GAUGE:${HB}:-25:25 \
53        DS:in2:GAUGE:${HB}:-25:25 \
54        DS:in3:GAUGE:${HB}:-25:25 \
55        DS:in4:GAUGE:${HB}:-25:25 \
56        DS:in5:GAUGE:${HB}:-25:25 \
57        DS:in6:GAUGE:${HB}:-25:25 \
58        DS:loadavg:GAUGE:${HB}:0:U \
59        RRA:AVERAGE:0.5:1:$RW
60
Note: See TracBrowser for help on using the browser.