decode-dimms.pl updated for kernel 2.6
I've modified decode-dimms.pl to work on kernel 2.6 using /sys/bus/i2c in place of /proc/sys/dev/sensors. I tried to preserve the ability to work with /proc, but I don't have a system running an old kernel to test it on. I've tested the new code on a Tyan S2892 motherboard running Fedora Core 4 with kernel-2.6.13-1.1526_FC4.
The original script repeatedly grabbed 16 bytes of EEPROM data; I moved that code into a subroutine get_16_bytes(). In the subroutine it now decides which method to use to grab the data based on whether the filename starts with /proc. If not, it invokes 'od' with various arguments to get the data. I'm not much of a Perl programmer, so there's probably a better way to do it.
The updated script is on my web site:
http://www.brouhaha.com/~eric/software/lm_sensors/decode-dimms.pl
Best regards,
Eric Smith
Hi Eric,
Quoted 5 lines
I've modified decode-dimms.pl to work on kernel 2.6 using
/sys/bus/i2cin place of/proc/sys/dev/sensors. I tried to preserve the ability to work with /proc, but I don't have a system running an old kernel to test it on. I've tested the new code on a Tyan S2892 motherboard running Fedora Core 4 with kernel-2.6.13-1.1526_FC4.
Well, the decode-dimms.pl script already supports sysfs, since July 15th this year. lm_sensors 2.9.2 has it. What's wrong with it?
--
Jean Delvare