Bruce Shaw wrote:
Off the top of my head, I like the look of it and will incorporate it
shortly. I may even extend some of its functionality into the Solaris side
of things.
Nice! That is great to hear about Solaris
For the archives: I just submitted the patch to the net-snmp patch
system (http://www.net-snmp.org/patches/). It has patch id 1416969.
Attached is a proposed patch to lmSensors.c. The primary intent is to
switch from a hard-coded maximum size for the sensors_array to one that
is dynamically sized. This avoids the "too many sensors" warnings and
allows retrieving all sensor values.
The patch also changes what I believe as the inadvertent use of clock()
instead of time() in the Linux specific code when determining the number
of elapsed seconds since the last sensor load. The switch to use time()
matches the existing behavior of the Solaris code.
Lastly, it includes a few minor changes to make some parts a little
clearer, such as using #defined values for VOLT_TYPE, FAN_TYPE,
TEMP_TYPE, and MISC_TYPE, where those are needed, instead of "magic
numbers."
We have tested the patched code on Fedora Core 4. In all cases, the
Solaris specific code has been left unaltered.
The patch is a diff against 5.3.0.1/HEAD.
This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take action
relying on it. Any communication received in error, or subsequent reply,
should be deleted or destroyed.
--
Thomas E Lackey
|