Recently described hddtemp application does not contain every possible hard drive in its database. I’ll be honest here, its development stopped many years ago, but it is still very useful, so I will shortly describe how to add new hard drive to the database.
I have acquired Intel 530 Series SSD which is missing in the application database.
$ sudo hddtemp /dev/sda WARNING: Drive /dev/sda doesn't seem to have a temperature sensor. WARNING: This doesn't mean it hasn't got one. WARNING: If you are sure it has one, please contact me (hddtemp@guzu.net). WARNING: See --help, --debug and --drivebase options. /dev/sda: INTEL SSDSC2BW180A4: no sensor
Notice hard drive name
INTEL SSDSC2BW180A4
as it will be needed later.Use smartcl
utility from smartmontools
package to identify attribute id
that contains temperature.
$ sudo smartctl --all /dev/sda smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local build) Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Intel 530 Series SSDs Device Model: INTEL SSDSC2BW180A4 Serial Number: CVDA515302HT1802GN LU WWN Device Id: 5 5cd2e4 04bfd50c9 Firmware Version: DC32 User Capacity: 180,045,766,656 bytes [180 GB] Sector Size: 512 bytes logical/physical Rotation Rate: Solid State Device Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-2 (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Wed Aug 26 10:08:28 2015 CEST SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED General SMART Values: Offline data collection status: (0x05) Offline data collection activity was aborted by an interrupting command from host. Auto Offline Data Collection: Disabled. Self-test execution status: ( 33) The self-test routine was interrupted by the host with a hard or soft reset. Total time to complete Offline data collection: ( 4395) seconds. Offline data collection capabilities: (0x7f) SMART execute Offline immediate. Auto Offline data collection on/off support. Abort Offline collection upon new command. Offline surface scan supported. Self-test supported. Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 1) minutes. Extended self-test routine recommended polling time: ( 48) minutes. Conveyance self-test routine recommended polling time: ( 2) minutes. SCT capabilities: (0x0025) SCT Status supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 10 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 5 Reallocated_Sector_Ct 0x0032 100 100 000 Old_age Always - 0 9 Power_On_Hours_and_Msec 0x0032 100 100 000 Old_age Always - 1054h+44m+52.720s 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 17 170 Available_Reservd_Space 0x0033 100 100 010 Pre-fail Always - 0 171 Program_Fail_Count 0x0032 100 100 000 Old_age Always - 0 172 Erase_Fail_Count 0x0032 100 100 000 Old_age Always - 0 174 Unexpect_Power_Loss_Ct 0x0032 100 100 000 Old_age Always - 7 183 SATA_Downshift_Count 0x0032 100 100 000 Old_age Always - 9 184 End-to-End_Error 0x0033 100 100 090 Pre-fail Always - 0 187 Uncorrectable_Error_Cnt 0x0032 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0032 053 058 000 Old_age Always - 53 (Min/Max 21/58) 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 7 199 UDMA_CRC_Error_Count 0x0032 100 100 000 Old_age Always - 0 225 Host_Writes_32MiB 0x0032 100 100 000 Old_age Always - 2205 226 Workld_Media_Wear_Indic 0x0032 100 100 000 Old_age Always - 65535 227 Workld_Host_Reads_Perc 0x0032 100 100 000 Old_age Always - 35 228 Workload_Minutes 0x0032 100 100 000 Old_age Always - 65535 232 Available_Reservd_Space 0x0033 100 100 010 Pre-fail Always - 0 233 Media_Wearout_Indicator 0x0032 100 100 000 Old_age Always - 0 241 Host_Writes_32MiB 0x0032 100 100 000 Old_age Always - 2205 242 Host_Reads_32MiB 0x0032 100 100 000 Old_age Always - 1096 249 NAND_Writes_1GiB 0x0032 100 100 000 Old_age Always - 1440 SMART Error Log not supported SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Offline Interrupted (host reset) 10% 410 - # 2 Offline Interrupted (host reset) 10% 42 - # 3 Offline Interrupted (host reset) 10% 42 - # 4 Offline Interrupted (host reset) 10% 42 - # 5 Offline Interrupted (host reset) 10% 26 - # 6 Offline Interrupted (host reset) 10% 26 - # 7 Offline Interrupted (host reset) 10% 23 - # 8 Offline Interrupted (host reset) 10% 9 - # 9 Offline Interrupted (host reset) 10% 9 - #10 Offline Interrupted (host reset) 10% 9 - #11 Offline Interrupted (host reset) 10% 9 - #12 Offline Interrupted (host reset) 10% 4 - #13 Offline Interrupted (host reset) 10% 2 - #14 Offline Interrupted (host reset) 10% 2 - #15 Offline Interrupted (host reset) 10% 2 - #16 Offline Interrupted (host reset) 10% 2 - #17 Offline Interrupted (host reset) 10% 0 - #18 Offline Interrupted (host reset) 10% 0 - SMART Selective self-test log data structure revision number 0 Note: revision number not 1 implies that no selective self-test has ever been run SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.
Notice that
attribute id 190
contains airflow temperature (Celsius)
.Verify that hddtemp
value for attribute/field id 190
is the same.
$ sudo hddtemp --debug /dev/sda ================= hddtemp 0.3-beta15 ================== Model: INTEL SSDSC2BW180A4 field(5) = 0 field(9) = 30 field(12) = 17 field(170) = 0 field(171) = 0 field(172) = 0 field(174) = 7 field(183) = 9 field(184) = 0 field(187) = 0 field(190) = 53 field(192) = 7 field(199) = 0 field(225) = 157 field(226) = 255 field(227) = 35 field(228) = 255 field(232) = 0 field(233) = 0 field(241) = 157 field(242) = 72 field(249) = 160
Append hard drive to the /etc/hddtemp.db
database using gathered data.
$ cat << EOF | sudo tee -a /etc/hddtemp.db "INTEL SSDMCEAW080A4" 190 C "INTEL SSD 530" EOF
Now you can use hddtemp
application and it will print correct temperature.
# hddtemp /dev/sda /dev/sda: INTEL SSDMCEAW080A4: 44°C