Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Linux > Ubuntu Tips and Tricks

February 15th, 2007, 11:07 GMT · By Mihai Marinof

How to Install lm_sensors on Ubuntu

SHARE:

Adjust text size:


The primary goal of the lm_sensors project is to provide the best and most complete hardware health monitoring drivers for Linux. The project developers strive to produce well organized, efficient, safe, flexible and tested code, free of charge, to all Linux users employing the x86 hardware platform. This software can be used on one hand by users who are curious of knowing the hardware health status of their machine. Some users will always try to squeeze every ounce of use out of their hardware by applying various tweaks to their hardware. This software can not only help users do that, but it can also show them how the rest of the hardware is doing. On the other hand, this project can also be used on high-end/unattended servers by setting it to monitor the hardware and email the administrator in the event of a problem, before it becomes critical.


Unfortunately, the lm_sensors project can't be pre-configured to work out-of-the-box because of the different hardware people use. Therefore, if you want to use it, you'll need to configure to suit your system and hardware specs.


Installing lm_sensors

- Open Synaptic GUI, search and install 'lm_sensors' or open a terminal and type:
CODE
$ sudo apt-get install lm_sensors

- Open a text editor (kwrite or gedit for a GUI editor, or nano for a terminal editor):
CODE
$ kwrite mkdev.sh
OR
$ nano mkdev.sh

- and then paste the following:
CODE
#!/bin/bash

# Here you can set several defaults.

# The number of devices to create (max: 256)
NUMBER=32

# The owner and group of the devices
OUSER=root
OGROUP=root
# The mode of the devices
MODE=600

# This script doesn't need to be run if devfs is used
if [ -r /proc/mounts ] ; then
if grep -q "/dev devfs" /proc/mounts ; then
echo "You do not need to run this script as your system uses devfs."
exit;
fi
fi

i=0;

while [ $i -lt $NUMBER ] ; do
echo /dev/i2c-$i
mknod -m $MODE /dev/i2c-$i c 89 $i || exit
chown "$OUSER:$OGROUP" /dev/i2c-$i || exit
i=$[$i + 1]
done
#end of file

- Save and close the editor, then make the file executable:
CODE
$ chmod +x mkdev.sh

- Then run it:
CODE
$ sudo ./mkdev.sh

- Finally, run the sensors detection program:
CODE
$ sudo sensors-detect

Answer YES to all questions, including to the option of automatic entry in /etc/modules.


Running lm_sensors

- Open a terminal and type
CODE
$ cat /etc/modules

- You will see a list similar to this:
CODE
# Generated by sensors-detect on Thu Feb 15 12:15:11 2007
# I2C adapter drivers
# modprobe unknown adapter NVIDIA i2c adapter 2 at 2:00.0
i2c-isa
# I2C chip drivers
eeprom
it87

- Load each module listed there. Replace the modules in the example with the ones found on your system.
CODE
$ sudo modprobe i2c-isa
$ sudo modprobe eeprom
$ sudo modprobe it87

- Run the following command to get the data from sensors.
CODE
$ sensors

- This command SHOULD give you an output similar to this:



Installing lm_sensors GUI front-ends

Optionally, you can install a front-end that shows the sensor info in Gnome or KDE.

- For Gnome (Add applet to taskbar):
CODE
$ sudo apt-get install sensors-applet

- For KDE:
CODE
$ sudo apt-get install ksensors

- Start it (KMenu / Utilities / ksensors in GUI, or type 'ksensors' in a terminal)
- Open configuration dialog, go to *module*sensors and select which sensors to show in Panel and which to show in Dock.

After everything has been installed and proved it's working, reboot your system.

TELL US WHAT YOU THINK:

18,022 hits · 3 comments · Link to this article · Print article · Send to friend · Subscribe to news

MUST-READ RELATED ARTICLES:


Screencast Guide: Capure Your Linux Desktop on Video!

Install Nvidia and ATI Video Drivers on Ubuntu Edgy

Installing NTFS Write Support on Fedora/Ubuntu

Install OpenOffice.org 2.1 in Ubuntu/Kubuntu

Install Kickoff KDE Menu in Kubuntu/Ubuntu

READER COMMENTS:


Comment #1 by: David on 15 Mar 2008, 03:09 UTC reply to this comment

Thank you sooo much for this. Being new to linux, I really needed someone to walk me through it.


Comment #2 by: Marty on 08 Oct 2008, 10:40 UTC reply to this comment

Excellent yet easy to follow set up to install and activate lm_sensors on my ubuntu system.
Great! Thanks a lot for posting this!


Comment #3 by: Dave on 28 Dec 2008, 07:34 UTC reply to this comment

Thanks. Really helped me out with this one!!

Copyright © 2001-2012 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM