« Scam, scam, scam (part II) | Main | ASP.NET cracked! »


Since the late 90s, most PC's have come with built-in health monitoring chips that sense temperatures, voltages and fan speeds, and all this useful -- and potentially PC-saving -- information is available to users.

In Linux, the best way of monitoring it is via the lm-sensors package that comes ready-installed in most distributions. It does however require a little configuration.
  • On a command line, run sensors-detect to kick off a routine to check out your hardware and see what kernel modules should be loaded to make the most effective use of lm-sensors.
  • At the end you'll be presented with a summary of findings and given the option of adding recommended drivers to /etc/modules. Type 'yes' if you want these modules loaded automatically every time you boot.
There's no need to reboot to try out lm-sensors. Just 'modprobe' each of the listed modules then do a sensors -s to evaluate the new configuration settings. In my case I got the message

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
w83627ehf
#----cut here----

... so I did

modprobe coretemp
modprobe w83627ehfupdate-grub
sensors -s


Simply running sensors then detailed all the information for my hardware.



Troubleshooting
I did have a little trouble loading w83627ehf driver as modprobe returned

FATAL: Error inserting w83627ehf (/lib/modules/2.6.32-24-generic/kernel/drivers/hwmon/w83627ehf.ko): Device or resource busy

but a little googling found the answer. In this case, adding the line

GRUB_CMDLINE_LINUX="acpi_enforce_resources=lax"

to /etc/default/grub then running update-grub solved the problem and loaded the driver when I rebooted.



Extensions
Once you have lm-sensors up and running you can get visual feedback from the likes of desktop widgets:



or run a daemon and plot your information over time:



There's also a ton of information on the lm-sensors website.


Previous Hidden Linux
Previous Hidden Linux


Follow Geoff Palmer on Twitter

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.