From ba7cb8eeca12ab23d5599ea499172f206ea8aaf0 Mon Sep 17 00:00:00 2001
From: Jean Delvare
Date: Fri, 20 Apr 2007 13:09:41 +0000
Subject: [PATCH] rrd: Misc updates * More hwmon class changes * Look for rrd
in /usr/bin by default * Add missing shell declarations * Update URI
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4372 7894878c-1315-0410-8ee3-d5d059ff63e0
---
CHANGES | 5 ++++-
prog/rrd/Makefile | 10 +++-------
prog/rrd/README | 13 +++++--------
prog/rrd/sens_create_rrd | 3 ++-
prog/rrd/sens_day.in | 5 ++---
prog/rrd/sens_update_rrd | 3 ++-
prog/rrd/sens_week.in | 5 ++---
prog/rrd/summ_week.in | 5 ++---
8 files changed, 22 insertions(+), 27 deletions(-)
diff --git a/CHANGES b/CHANGES
index 32367431..c5c02af6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,7 +6,10 @@ SVN HEAD
Library: Clean up pwm symbol names translation
Add dme1737 support
Program isadump: Detect when address bit 7 is a busy flag
- Program sens_update_rrd: Support only hwmon class devices
+ Program rrd: Support only hwmon class devices
+ Look for rrd in /usr/bin by default
+ Add missing shell declarations
+ Update URI
Program sensors: Drop ddcmon and eeprom support
Add dme1737 support
Program sensors-detect: Stop Super-I/O probe after first family success
diff --git a/prog/rrd/Makefile b/prog/rrd/Makefile
index 0190418a..87554293 100644
--- a/prog/rrd/Makefile
+++ b/prog/rrd/Makefile
@@ -4,18 +4,14 @@
USER=apache
# CRONTAB not used
#CRONTAB=/var/spool/cron/tabs/$(USER)
-RRDPATH=/usr/local/rrdtool/bin
+RRDPATH=/usr/bin
BINPATH=/usr/local/bin
RRDDIR=/var/lib/sensors-rrd
APACHE=/var/www/html
APACHDIR=$(APACHE)/senspix
MACH=`uname -n`
-# 2.4 kernels
-#SENSDEV=w83781d-isa-0290
-#SENSDIR=/proc/sys/dev/sensors/$(SENSDEV)
-# 2.6 kernels
-SENSDEV=0-0290
-SENSDIR=/sys/bus/i2c/devices/$(SENSDEV)
+SENSDEV=hwmon0
+SENSDIR=/sys/class/hwmon/$(SENSDEV)/device
################################################
# Everything below here should be fine
#
diff --git a/prog/rrd/README b/prog/rrd/README
index b9cb0433..89ab85c4 100644
--- a/prog/rrd/README
+++ b/prog/rrd/README
@@ -6,7 +6,7 @@ graphs of sensor data.
The RRD (Round Robin Database) package is REQUIRED.
Get this package from
- http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
+ http://oss.oetiker.ch/rrdtool/
A web server with CGI support is required.
@@ -26,7 +26,7 @@ following advantages:
If you are looking for something a little simpler,
that does not require RRD, try ../tellerstats.
-The RRD scripts read /proc entries and do not use libsensors.
+The RRD scripts read /sys entries and do not use libsensors.
Therefore the scale factors in /etc/sensors.conf are not used,
and you may have to change the scale factors in the cgi scripts.
@@ -45,15 +45,13 @@ INSTALLATION INSTRUCTIONS
- Make and install lm_sensors. Get it working (run 'sensors')
before you try this!
- Get RRD, make and install it
- - cd /usr/local; ln -s rrdtool-x.y.z rrdtool
- - cd back to here
- Edit the top of the Makefile. Do NOT skip this step.
The defaults will probably not work for you.
Here are the defaults:
Cron user
USER=httpd
Path to rrdtool and rrdcgi
- RRDPATH=/usr/local/rrdtool/bin
+ RRDPATH=/usr/bin
Place to install sens_update_rrd script
BINPATH=/usr/local/bin
Place to store the database
@@ -63,8 +61,7 @@ INSTALLATION INSTRUCTIONS
APACHDIR=$(APACHE)/senspix
The sensor device in your system
(isa recommended over i2c if both are available)
- SENSDEV=w83781d-isa-0290 (2.4 kernel - look in /proc/sys/dev/sensors)
- SENSDEV=0-0290 (2.6 kernel - look in /sys/i2c/bus/devices)
+ SENSDEV=hwmon0 (look in /sys/class/hwmon)
- make
- (as root) make install, which does the following.
If you don't want it to do this, install by hand!!!
@@ -74,7 +71,7 @@ INSTALLATION INSTRUCTIONS
- Manually add the following line to the crontab for
the user specified above, which will call the data gathering
script every 5 minutes (adjust paths as necessary)
- */5 * * * * /usr/local/bin/sens_update_rrd /var/lib/sensors-rrd/sensors.rrd w83781d-isa-0290
+ */5 * * * * /usr/local/bin/sens_update_rrd /var/lib/sensors-rrd/sensors.rrd hwmon0
- Load http://localhost/senspix/sens_day.cgi in your web browser
to test
diff --git a/prog/rrd/sens_create_rrd b/prog/rrd/sens_create_rrd
index df0fc6c2..0b2a8574 100755
--- a/prog/rrd/sens_create_rrd
+++ b/prog/rrd/sens_create_rrd
@@ -1,3 +1,4 @@
+#!/bin/sh
#
# sens_create_rrd -
# Create a sensors rrd database of 14 sensor readings
@@ -19,7 +20,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-RRDPATH=/usr/local/rrdtool/bin
+RRDPATH=/usr/bin
RRDB=$1
#Heartbeat 15 minutes
HB=900
diff --git a/prog/rrd/sens_day.in b/prog/rrd/sens_day.in
index a564632f..75dc13bd 100644
--- a/prog/rrd/sens_day.in
+++ b/prog/rrd/sens_day.in
@@ -5,7 +5,6 @@
One Day Hardware Statistics for %%MACH%%
-
ONE DAY VIEW
See also:
One Week View
@@ -218,10 +217,10 @@ See also:
This page generated with data and scripts from
-The lm_sensors drivers;
+the lm_sensors project;
the data are stored in a Round Robin Database and
the graphs are generated by
-
+
RRD.
diff --git a/prog/rrd/sens_update_rrd b/prog/rrd/sens_update_rrd
index 65920531..2d7fa967 100755
--- a/prog/rrd/sens_update_rrd
+++ b/prog/rrd/sens_update_rrd
@@ -1,3 +1,4 @@
+#!/bin/sh
#
# sens_update_rrd -
# Update a sensors rrd database.
@@ -37,7 +38,7 @@ else
HWMON=hwmon0
fi
#
-RRDPATH=/usr/local/rrdtool/bin
+RRDPATH=/usr/bin
RRDB=$1
SENSDIR=/sys/class/hwmon
diff --git a/prog/rrd/sens_week.in b/prog/rrd/sens_week.in
index c240ff66..cce50555 100644
--- a/prog/rrd/sens_week.in
+++ b/prog/rrd/sens_week.in
@@ -5,7 +5,6 @@
One Week Hardware Statistics for %%MACH%%
-
ONE WEEK VIEW
See also:
One Day View
@@ -218,10 +217,10 @@ See also:
This page generated with data and scripts from
-The lm_sensors drivers;
+the lm_sensors project;
the data are stored in a Round Robin Database and
the graphs are generated by
-
+
RRD.
diff --git a/prog/rrd/summ_week.in b/prog/rrd/summ_week.in
index 7acd55bb..713197dc 100644
--- a/prog/rrd/summ_week.in
+++ b/prog/rrd/summ_week.in
@@ -5,7 +5,6 @@
One Week Summary Hardware Statistics for %%MACH%%
-
ONE WEEK SUMMARY VIEW
See also:
One Day View
@@ -90,10 +89,10 @@ See also:
This page generated with data and scripts from
-The lm_sensors drivers;
+the lm_sensors project;
the data are stored in a Round Robin Database and
the graphs are generated by
-
+
RRD.