mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-17 19:30:26 +00:00
MH: Put sanity limits in the Round Robin Database upon creation:
-25 <= voltage <= 25 0 <= RPM <= 12000 0 <= temp <= 250 0 <= MHz Prevents spurious sensor readings from skewing graphs (too much). git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1566 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
a884de5865
commit
1527dd254f
3 files changed
+25
-3
No files matched your search
+23
-1
@@ -193,8 +193,30 @@ rrdGetSensors_DS
|
||||
if (!feature || feature->rrd) {
|
||||
struct ds *data = (struct ds *) _data;
|
||||
char *ptr = rrdBuff + data->num * RRD_BUFF;
|
||||
const char *min, *max;
|
||||
data->argv[data->num ++] = ptr;
|
||||
sprintf (ptr, "DS:%s:GAUGE:%d:U:U", rawLabel, /* number of seconds downtime during which average be used instead of unknown */ 5 * rrdTime);
|
||||
switch (feature->type) { /* arbitrary sanity limits */
|
||||
case DataType_voltage:
|
||||
min="-25";
|
||||
max="25";
|
||||
break;
|
||||
case DataType_rpm:
|
||||
min = "0";
|
||||
max = "12000";
|
||||
break;
|
||||
case DataType_temperature:
|
||||
min = "0";
|
||||
max = "250";
|
||||
break;
|
||||
case DataType_mhz:
|
||||
min = "0";
|
||||
max = "U";
|
||||
break;
|
||||
default:
|
||||
min = max = "U";
|
||||
break;
|
||||
}
|
||||
sprintf (ptr, "DS:%s:GAUGE:%d:%s:%s", rawLabel, /* number of seconds downtime during which average be used instead of unknown */ 5 * rrdTime, min, max);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
.\" Formatted or processed versions of this manual, if unaccompanied by
|
||||
.\" the source, must acknowledge the copyright and authors of this work.
|
||||
.\"
|
||||
.TH sensord 8 "July 31, 2002" "Version 0.6.2" "Linux System Administration"
|
||||
.TH sensord 8 "October 23, 2002" "Version 0.6.3" "Linux System Administration"
|
||||
.SH NAME
|
||||
sensord \- Sensor information logging daemon.
|
||||
.SH SYNOPSIS
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#define version "0.6.2"
|
||||
#define version "0.6.3"
|
||||
|
||||
#include "lib/sensors.h"
|
||||
|
||||
|
||||
Reference in new issue
Block a user