How to get online temperature status on your linux box.
There is one good package which allow you to control and check your computer temperature in online mode. To install For debian:
apt-get install lm-sensors
for CentOS or RH:
yum install lm-sensors
Next software should discover all sensors in your PC, run sensors-detect:
agrytsenko:~# sensors-detect
# sensors-detect revision 5729 (2009-06-02 15:51:29 +0200)
# System: Hewlett-Packard HP Compaq 6510b (GB866EA#ACB) (laptop)
# Board: Hewlett-Packard 30C0
This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.
Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no):
Silicon Integrated Systems SIS5595... No
VIA VT82C686 Integrated Sensors... No
VIA VT8231 Integrated Sensors... No
AMD K8 thermal sensors... No
AMD K10 thermal sensors... No
Intel Core family thermal sensor... Success!
(driver `coretemp')
Intel AMB FB-DIMM thermal sensor... No
VIA C7 thermal and voltage sensors... No
Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor'... No
Trying family `SMSC'... Yes
Found unknown chip with ID 0x3600
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor'... No
Trying family `SMSC'... Yes
Found unknown non-standard chip with ID 0x7a
Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no):
Probing for `National Semiconductor LM78' at 0x290... No
Probing for `National Semiconductor LM79' at 0x290... No
Probing for `Winbond W83781D' at 0x290... No
Probing for `Winbond W83782D' at 0x290... No
Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no):
Sorry, no supported PCI bus adapters found.
Module i2c-dev loaded successfully.
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `coretemp':
* Chip `Intel Core family thermal sensor' (confidence: 9)
To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!
Do you want to add these lines automatically to /etc/modules? (yes/NO)yes
Successful!
Monitoring programs won't work until the needed modules are
loaded. You may want to run '/etc/init.d/module-init-tools start'
to load them.
Unloading i2c-dev... OK
If you have choosen “yes” on last question then all needed kernel modules were added to your module config file. In my case only one module is found, here is it:
agrytsenko:~# grep temp /etc/modules coretemp
To get sensors status and data run sensors:
agrytsenko:~# sensors acpitz-virtual-0 Adapter: Virtual device temp1: +60.0°C (crit = +256.0°C) temp2: +58.0°C (crit = +108.0°C) temp3: +45.0°C (crit = +105.0°C) temp4: +32.5°C (crit = +108.0°C) temp5: +65.0°C (crit = +110.0°C) coretemp-isa-0000 Adapter: ISA adapter Core 0: +59.0°C (high = +100.0°C, crit = +100.0°C) coretemp-isa-0001 Adapter: ISA adapter Core 1: +61.0°C (high = +100.0°C, crit = +100.0°C)
The output depends on your hardware sensors. This output from my another PC:
w83627hf-isa-0290
Adapter: ISA adapter
VCore 1: +1.47 V (min = +1.30 V, max = +1.71 V)
VCore 2: +1.82 V (min = +1.30 V, max = +1.71 V) ALARM
+3.3V: +3.25 V (min = +2.82 V, max = +3.79 V)
+5V: +4.89 V (min = +4.06 V, max = +5.70 V)
+12V: +12.28 V (min = +7.24 V, max = +9.97 V) ALARM
-12V: -11.95 V (min = +4.58 V, max = -11.87 V) ALARM
-5V: -5.20 V (min = +2.09 V, max = -4.39 V) ALARM
V5SB: +5.46 V (min = +5.99 V, max = +5.19 V) ALARM
VBat: +2.85 V (min = +3.54 V, max = +3.49 V) ALARM
fan1: 0 RPM (min = 10887 RPM, div = 2) ALARM
fan2: 0 RPM (min = 3947 RPM, div = 2) ALARM
fan3: 0 RPM (min = 4411 RPM, div = 2) ALARM
temp1: +28 C (high = +68 C, hyst = +48 C) sensor = thermistor
temp2: +43.0 C (high = +70 C, hyst = +65 C) sensor = diode(beep)
temp3: -1.5 C (high = +70 C, hyst = +65 C) sensor = diode
vid: +1.500 V (VRM Version 8.5)
alarms:
beep_enable:
Sound alarm enabled
Now you can do with these info whatever you want, for instance put into the file as plain text or excel document or even storage in RDBMS. I prefer to store these data’s in Round Robin Database and draw nice graphs by rrdtool util.
