System temperature
Jump to navigation
Jump to search
I have a round robin database graph of system temperature based on the output of lm-sensors with an extra feed from the web to get current outside temperature.
When I upgraded to Karmic Koala, lm-sensors became much more boring and probably more safe. So I'm looking for other sources of temperature data. smartctl provides the temperature of each hard disk, so I'll use that.
root@weasel:~# smartctl -l scttempsts /dev/sdc smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF READ SMART DATA SECTION === SCT Status Version: 2 SCT Version (vendor specific): 258 (0x0102) SCT Support Level: 1 Device State: Active (0) Current Temperature: 35 Celsius Power Cycle Min/Max Temperature: 29/41 Celsius Lifetime Min/Max Temperature: 33/47 Celsius Under/Over Temperature Limit Count: 0/0
smartctl wants to be fed a disk name in the form of "/dev/sdx" but I can't just look at /etc/fstab to get that info anymore. The proc file system probably has it in there somewhere.
root@weasel:/proc/scsi# cat scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST3250823AS Rev: 3.03 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST3250823AS Rev: 3.03 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: WDC WD5000AACS-0 Rev: 01.0 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi3 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST3500630AS Rev: 3.AA Type: Direct-Access ANSI SCSI revision: 05 Host: scsi4 Channel: 00 Id: 00 Lun: 00 Vendor: LITE-ON Model: DVDRW SOHW-1693S Rev: KS06 Type: CD-ROM ANSI SCSI revision: 05 Host: scsi7 Channel: 00 Id: 00 Lun: 00 Vendor: TRUSTED Model: Mass Storage Rev: 2.00 Type: Direct-Access ANSI SCSI revision: 02
root@weasel:/proc# cat diskstats 8 1 sda1 166 209 3000 2640 0 0 0 0 0 1500 2640 8 2 sda2 4 0 8 90 0 0 0 0 0 90 90 8 5 sda5 154842 339634 15100341 3588800 302206 462534 6120784 2066350 0 821880 5654820 8 16 sdb 28090 67387 759694 465920 22556 1075819 8787048 3946510 0 232970 4412370 8 17 sdb1 28056 67272 758502 465740 22556 1075819 8787048 3946510 0 232810 4412190 8 32 sdc 44427 49506 9495900 245650 9591 842915 6820488 4971090 0 277980 5216650 8 48 sdd 2007 2576 36664 10250 11442 1179963 9531240 1880510 0 75290 1890740 11 0 sr0 74 251 2400 19490 0 0 0 0 0 12500 19490 252 0 dm-0 98372 0 787050 6840860 2289786 0 18318288 653213300 0 304380 660054140 252 1 dm-1 547 0 4082 15330 11 0 88 170 0 3230 15500 252 2 dm-2 92718 0 9485458 529330 852550 0 6820400 580988670 0 274930 581517970 252 3 dm-3 495788 0 15095658 9441860 764468 0 6115744 21275760 0 821620 30717630 252 4 dm-4 411 0 3288 12390 630 0 5040 4760 0 1760 17150 8 80 sdf 103 183 2288 6510 0 0 0 0 0 3470 6510
Given the list from diskstats, only /dev/sdc is capable of reporting temperature through smart. Maybe that's enough.