sudo apt-get install smartmontools
sudo smartctl -A /dev/sda smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.5.0-45-generic] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net === START OF READ SMART DATA SECTION === 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 1 Raw_Read_Error_Rate 0x000f 115 099 006 Pre-fail Always - 99259379 3 Spin_Up_Time 0x0003 097 097 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 099 099 020 Old_age Always - 1674 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 082 060 030 Pre-fail Always - 175777622 9 Power_On_Hours 0x0032 091 091 000 Old_age Always - 8254 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 835 183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0 184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0 187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0 188 Command_Timeout 0x0032 100 099 000 Old_age Always - 1 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 068 061 045 Old_age Always - 32 (Min/Max 20/33) 194 Temperature_Celsius 0x0022 032 040 000 Old_age Always - 32 (0 17 0 0) 195 Hardware_ECC_Recovered 0x001a 038 031 000 Old_age Always - 99259379 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 210818469734755 241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 1928255554 242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 419058725
其中,Power_On_Hours就是。