Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 157119 Details for
Bug 171000
net-snmp can't read lm_sensors' values
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
experimental patch
net-snmp-5.1.2-sensors.patch (text/plain), 4.89 KB, created by
Jan Safranek
on 2007-06-15 14:56:18 UTC
(
hide
)
Description:
experimental patch
Filename:
MIME Type:
Creator:
Jan Safranek
Created:
2007-06-15 14:56:18 UTC
Size:
4.89 KB
patch
obsolete
>--- net-snmp-5.1.2/agent/mibgroup/ucd-snmp/lmSensors.c.orig 2007-06-15 15:25:23.000000000 +0200 >+++ net-snmp-5.1.2/agent/mibgroup/ucd-snmp/lmSensors.c 2007-06-15 15:22:19.000000000 +0200 >@@ -25,7 +25,7 @@ > > #define N_TYPES (4) > #define MAX_NAME (64) >-#define MAX_SENSORS (128) >+#define MAX_SENSORS (512) > > /* > * lmSensors_variables_oid: >@@ -145,8 +145,10 @@ > > _sensor s; > >+ DEBUGMSGTL(("sensors","var_lmSensorsTable entered\n")); > sensor_load(); > >+ DEBUGMSGTL(("sensors","var_lmSensorsTable magic is %d\n", vp->magic)); > switch (vp->magic) { > case LMTEMPSENSORSINDEX: > case LMTEMPSENSORSDEVICE: >@@ -180,6 +182,7 @@ > s_type = -1; > n_sensors = 0; > } >+ DEBUGMSGTL(("sensors","var_lmSensorsTable after magic decode. type=%i, sensors=%i\n", s_type, n_sensors)); > > if (header_simple_table(vp, name, length, exact, > var_len, write_method, >@@ -190,7 +193,9 @@ > return NULL; > > s_index = name[*length - 1] - 1; >- s = sensor_array[s_type].sensor[s_index]; >+ DEBUGMSGTL(("sensors","var_lmSensorsTable after index=%i\n", s_index)); >+ s = sensor_array[s_type].sensor[s_index]; >+ DEBUGMSGTL(("sensors","var_lmSensorsTable queried sensor is %s val %d\n", s.name, s.value)); > > switch (vp->magic) { > case LMTEMPSENSORSINDEX: >@@ -198,6 +203,7 @@ > case LMVOLTSENSORSINDEX: > case LMMISCSENSORSINDEX: > long_ret = s_index; >+ DEBUGMSGTL(("sensors","var_lmSensorsTable left on LMTEMPSENSORSINDEX\n")); > return (unsigned char *) &long_ret; > > case LMTEMPSENSORSDEVICE: >@@ -206,6 +212,7 @@ > case LMMISCSENSORSDEVICE: > strncpy(string, s.name, SPRINT_MAX_LEN - 1); > *var_len = strlen(string); >+ DEBUGMSGTL(("sensors","var_lmSensorsTable left on LMTEMPSENSORSDEVICE\n")); > return (unsigned char *) string; > > case LMTEMPSENSORSVALUE: >@@ -213,12 +220,14 @@ > case LMVOLTSENSORSVALUE: > case LMMISCSENSORSVALUE: > long_ret = s.value; >+ DEBUGMSGTL(("sensors","var_lmSensorsTable left on LMTEMPSENSORSVALUE\n")); > return (unsigned char *) &long_ret; > > default: > ERROR_MSG("Unable to handle table request"); > } > >+ DEBUGMSGTL(("sensors","var_lmSensorsTable left\n")); > return NULL; > } > >@@ -262,12 +271,15 @@ > for (i = 0; i < N_TYPES; i++) > sensor_array[i].n = 0; > >+ DEBUGMSGTL(("sensors","_sensor_load entered\n")); >+ > while (chip = sensors_get_detected_chips(&chip_nr)) { > int a = 0; > int b = 0; > while (data = sensors_get_all_features(*chip, &a, &b)) { > char *label = NULL; > double val; >+ DEBUGMSGTL(("sensors","_sensor_load something detected \n")); > > if ((data->mode & SENSORS_MODE_R) && > (data->mapping == SENSORS_NO_MAPPING) && >@@ -277,36 +289,46 @@ > float mul; > _sensor_array *array; > >+ DEBUGMSGTL(("sensors","_sensor_load ... it is %s=%f \n", label, val)); > > if (strstr(label, "V")) { > type = 2; > mul = 1000.0; >+ DEBUGMSGTL(("sensors","_sensor_load ... it is 'V' \n")); > } > if (strstr(label, "fan") || strstr(label, "Fan")) { > type = 1; > mul = 1.0; >+ DEBUGMSGTL(("sensors","_sensor_load ... it is 'fan' \n")); > } > if (strstr(label, "temp") || strstr(label, "Temp")) { > type = 0; > mul = 1000.0; >+ DEBUGMSGTL(("sensors","_sensor_load ... it is 'temp' \n")); > } > if (type == -1) { > type = 3; > mul = 1000.0; >+ DEBUGMSGTL(("sensors","_sensor_load ... it is unknown \n")); > } > > array = &sensor_array[type]; > if (MAX_SENSORS <= array->n) { > snmp_log(LOG_ERR, "too many sensors. ignoring %s\n", label); >- break; >+ /* do not break, let's display all missed sensors ! break; */ >+ continue; > } > strncpy(array->sensor[array->n].name, label, MAX_NAME); > array->sensor[array->n].value = (int) (val * mul); >- DEBUGMSGTL(("sensors","sensor %d, value %d\n", >+ DEBUGMSGTL(("sensors","sensor %s, value %d at position %i\n", > array->sensor[array->n].name, >- array->sensor[array->n].value)); >+ array->sensor[array->n].value, >+ array->n)); > array->n++; > } >+ else { >+ DEBUGMSGTL(("sensors","_sensor_load ... it was skipped \n")); >+ } > if (label) { > free(label); > label = NULL; >@@ -315,4 +337,5 @@ > } > > timestamp = t; >+ DEBUGMSGTL(("sensors","_sensor_load left\n")); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 171000
:
140658
|
140659
| 157119