查看硬盘的通电时间,可以安装Smartctl (意思是:Self-Monitoring, Analysis and Reporting Technology)
Smartcl在CentOS下的安装步骤:
yum install smartmontools
smartctl -A /dev/sda
下面截图是一台服务器的通电时间,只有233个小时,挺新的硬盘。
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000b 100 100 062 Pre-fail Always - 0 2 Throughput_Performance 0x0004 100 100 000 Old_age Offline - 0 3 Spin_Up_Time 0x0007 131 131 033 Pre-fail Always - 2 4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 11 5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0 7 Seek_Error_Rate 0x000a 100 100 000 Old_age Always - 0 8 Seek_Time_Performance 0x0004 100 100 000 Old_age Offline - 0 9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 233 10 Spin_Retry_Count 0x0012 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 11 191 G-Sense_Error_Rate 0x000a 100 100 000 Old_age Always - 0 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 3 193 Load_Cycle_Count 0x0012 099 099 000 Old_age Always - 12775 194 Temperature_Celsius 0x0002 206 206 000 Old_age Always - 29 (Min/Max 19/35) 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 200 200 000 Old_age Always - 0 223 Load_Retry_Count 0x000a 100 100 000 Old_age Always - 0 240 Head_Flying_Hours 0x0032 100 100 000 Old_age Always - 13 241 Total_LBAs_Written 0x0032 100 100 000 Old_age Always - 160550202 242 Total_LBAs_Read 0x0032 100 100 000 Old_age Always - 3935552 254 Free_Fall_Sensor 0x0032 100 100 000 Old_age Always - 0