Debian 10.05查看硬盘温度和smart
最近组了一个raid 1,用的小机箱,温度比较高,所以想看下硬盘的温度。在debian里面,安装smartmontools即可。
一,安装smartmontools
apt-get install -y smartmontools
二,列出硬盘
fdisk -l
三,查看硬盘信息
smartctl -a /dev/sdc
可以显示smart信息
SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000b 100 100 001 Pre-fail Always - 0 2 Throughput_Performance 0x0004 131 131 054 Old_age Offline - 116 3 Spin_Up_Time 0x0007 081 081 001 Pre-fail Always - 378 (Average 386) 4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 29 5 Reallocated_Sector_Ct 0x0033 100 100 001 Pre-fail Always - 0 7 Seek_Error_Rate 0x000a 100 100 001 Old_age Always - 0 8 Seek_Time_Performance 0x0004 133 133 020 Old_age Offline - 18 9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 418 10 Spin_Retry_Count 0x0012 100 100 001 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 27 22 Unknown_Attribute 0x0023 100 100 025 Pre-fail Always - 100 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 51 193 Load_Cycle_Count 0x0012 100 100 000 Old_age Always - 51 194 Temperature_Celsius 0x0002 028 028 000 Old_age Always - 47 (Min/Max 25/50) 196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0 197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x000a 100 100 000 Old_age Always - 0 SMART Error Log Version: 1 No Errors Logged
四,利用smart快速评估硬盘健康结果
root@debian:~# smartctl -H /dev/sdb smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-9-amd64] (local build) Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED
smartctl -H /dev/sdb
看到最后的PASSED,表示这个硬盘近期没有问题,可以放心使用。