How to detect CPU temperature, fan speeds and voltages (lm-sensors)
sudo apt-get install lm-sensors
Create file called mkdev.sh, and paste in the following
#!/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
Make this file executable, then run it
sudo chmod +x mkdev.sh
sudo ./mkdev.sh
Now detect sensors, and answer "y" to all questions.
sudo sensors-detect
To load the manual modules, type
sudo /etc/init.d/module-init-tools
Load the modules into kernel with
sudo sensors -s
And check the output
sudo sensors
How to control fan speed (lm-sensors)
Install and config lm-sensors first, see section above. Then run pwmconfig to test your fans
pwmconfig
If you can control fan speeds, great. Now creat a file called /etc/init.d/fancontrol, and paste in the following
#!/bin/sh
#
# Fancontrol start script.
#
set -e
# Defaults
DAEMON=/usr/sbin/fancontrol
PIDFILE=/var/run/fancontrol-pid
PATH=/sbin:/bin:/usr/sbin:/usr/bin
test -f $DAEMON || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_begin_msg "Starting fancontrol daemon..."
start-stop-daemon --start -o -q -m -b -p $PIDFILE -x $DAEMON
log_end_msg $?
;;
stop)
log_begin_msg "Stopping fancontrol daemon..."
start-stop-daemon --stop -o -q -p $PIDFILE
log_end_msg $?
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
*)
log_success_msg "Usage: /etc/init.d/fancontrol {start|stop|restart|force-reload}"
log_success_msg " start - starts system-wide fancontrol service"
log_success_msg " stop - stops system-wide fancontrol service"
log_success_msg " restart, force-reload - starts a new system-wide fancontrol service"
exit 1
;;
esac
exit 0
Make it excutable
sudo chmod +x /etc/init.d/fancontrol
Test it
/etc/init.d/fancontrol start
and
/etc/init.d/fancontrol stop
If it works fine, autoload it when you reboot. Insert the following line into /etc/rc.local, before "exit 0"
/etc/init.d/fancontrol start
How to monitor CPU, GPU temperatures, fan speeds and voltages (GKrellM)
* Install lm-sensors first to monitor CPU temps, fan speed, and voltages in GKrellM. #How to detect CPU temperature, fan speeds and voltages (lm-sensors)
* Install nvidia video driver to monitor the nvidia GPU temperature. #How to install Graphics Driver (NVIDIA)
* Install hddtemp first to monitor hard drive temperatures
sudo apt-get install hddtemp
GKrellM is a hardware monitor that can display CPU and GPU temperatures, fan speeds, voltages, CPU load, network load, disk activity, disk temperature, memory usage, and swap usage. The installation is very easy, and configuration is just a few mouse-clicks. You can set alerts to warn you if the CPU is too hot or there is a fan failure. The hddtemp utility works with GKrellM to allow it to sense the disk temperature, as keeping your disks cool (e.g. less than around 40C) will allow them to last longer than if they run continually at higher temperatures (e.g. above 50C).
sudo apt-get install gkrellm
To run the program
Click Applications -> System Tools -> GKrellM
To configure the settings,
Right click on GKrellM -> Configuration
I was struggling with lm_sensors before, but it doesn't detect all of the sensors on my computer. Later I found "GKrellM". It displays the GPU temperature on my nVidia 6600 GT out of the box. GKrellM also has plugins that show weather info, set reminders, etc.