From 1628d2af14930315c450c4f1a072718223c88d45 Mon Sep 17 00:00:00 2001
From: Jean Delvare
Date: Fri, 20 Apr 2007 13:32:53 +0000
Subject: [PATCH] More rrd cleanups: * Update Makefile and README to mention
hwmon class for newer 2.6 kernels * Add missing shell declarations * Update
URI
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4373 7894878c-1315-0410-8ee3-d5d059ff63e0
---
CHANGES | 4 +++-
prog/rrd/Makefile | 9 ++++++---
prog/rrd/README | 14 ++++++++------
prog/rrd/sens_create_rrd | 1 +
prog/rrd/sens_day.in | 5 ++---
prog/rrd/sens_update_rrd | 1 +
prog/rrd/sens_week.in | 5 ++---
prog/rrd/summ_week.in | 5 ++---
8 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/CHANGES b/CHANGES
index aff7e838..5d8f7e22 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,7 +7,9 @@ SVN HEAD
Add dme1737 support
Man page sensors.conf.5: Update the chip statement section
Program isadump: Detect when address bit 7 is a busy flag
- Program sens_update_rrd: Support non-i2c devices (hwmon class)
+ Program rrd: Support non-i2c devices (hwmon class)
+ 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..0f817707 100644
--- a/prog/rrd/Makefile
+++ b/prog/rrd/Makefile
@@ -13,9 +13,12 @@ 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)
+# 2.6 kernels up to 2.6.13
+#SENSDEV=0-0290
+#SENSDIR=/sys/bus/i2c/devices/$(SENSDEV)
+# 2.6.14 and later kernels
+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..3717f086 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 /proc or /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,8 +45,6 @@ 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:
@@ -63,8 +61,12 @@ 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)
+ 2.4 kernel - look in /proc/sys/dev/sensors:
+ SENSDEV=w83781d-isa-0290
+ 2.6 kernel up to 2.6.13 - look in /sys/i2c/bus/devices:
+ SENSDEV=0-0290
+ 2.6.14+ kernel - look in /sys/class/hwmon:
+ SENSDEV=hwmon0
- make
- (as root) make install, which does the following.
If you don't want it to do this, install by hand!!!
diff --git a/prog/rrd/sens_create_rrd b/prog/rrd/sens_create_rrd
index df0fc6c2..0051005f 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
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 346be22e..c1f37433 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.
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.