硬盘的SMART记录了硬盘的报错、硬盘的当前的温度、硬盘的加电时间等,通过smartmontools可以获得这些信息。
安装:
debian/ubuntu: apt-get install smartmontools
FreeBSD: cd /usr/ports/sysutils/smartmontools && make install clean;
使用:
以下是我笔记本硬盘的信息:
$ smartctl -i /dev/sda
Handle 0x0001, DMI type 1, 25 bytes
System Information
Manufacturer: IBM
Product Name: 2668AH3
Version: ThinkPad T43
Serial Number: L3TLL14
UUID: 540DB801-471D-11CB-8A5F-912E855BB5C9
Wake-up Type: Power Switch
$ smartctl -A /dev/sda
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is 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 117 099 006 Pre-fail Always – 143649531
3 Spin_Up_Time 0x0003 098 098 000 Pre-fail Always – 0
4 Start_Stop_Count 0x0032 099 099 020 Old_age Always – 1683
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
7 Seek_Error_Rate 0x000f 079 060 030 Pre-fail Always – 89102276
9 Power_On_Hours 0x0032 096 096 000 Old_age Always – 4020
10 Spin_Retry_Count 0x0013 100 100 034 Pre-fail Always – 0
12 Power_Cycle_Count 0x0032 099 099 020 Old_age Always – 1416
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always – 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always – 0
190 Airflow_Temperature_Cel 0x0022 059 045 045 Old_age Always In_the_past 41 (Lifetime Min/Max 41/41)
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always – 610
193 Load_Cycle_Count 0x0032 016 016 000 Old_age Always – 168121
194 Temperature_Celsius 0x0022 041 055 000 Old_age Always – 41 (0 13 0 0)
195 Hardware_ECC_Recovered 0x001a 068 053 000 Old_age Always – 107368157
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always – 1
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline – 1
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always – 0
200 Multi_Zone_Error_Rate 0x0000 100 253 000 Old_age Offline – 0
202 TA_Increase_Count 0x0032 100 253 000 Old_age Always – 0
上面的输出有很多有有用的信息,先说两个:
9 Power_On_Hours 4020,单位是小时,总加电时间为4020小时。
194 Temperature_Celsius 41,单位是摄氏度,当前的磁盘温度为41摄氏度。
除了上面举出的两个例子之外,硬盘的SMART内的信息还有很多,SMART的协议标准和字段属性说明可以参见wikipedia:
http://en.wikipedia.org/wiki/S.M.A.R.T.
… [Trackback]…
[…] Read More here: qingran.net/2009/07/得到硬盘的运行时间、温度等smart信息?/ […]…