Linux 下查看硬盘使用时间
需要安装这个:
http://smartmontools.sourceforge.net/
如果是centos直接运行yum install smartmontools -y就可以了
然后输入这个:
smartctl -A /dev/sda
如果不行用df看看硬盘名称,把sda换了即可
=== 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 0×000f 083 063 044 Pre-fail Always - 204269687
3 Spin_Up_Time 0×0003 099 099 000 Pre-fail Always - 0
4 Start_Stop_Count 0×0032 100 100 020 Old_age Always - 18
5 Reallocated_Sector_Ct 0×0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0×000f 069 060 030 Pre-fail Always - 7825289
9 Power_On_Hours 0×0032 099 099 000 Old_age Always - 1626
10 Spin_Retry_Count 0×0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0×0032 100 037 020 Old_age Always - 18
184 Unknown_Attribute 0×0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0×0032 100 100 000 Old_age Always - 0
188 Unknown_Attribute 0×0032 100 099 000 Old_age Always - 12
189 High_Fly_Writes 0×003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0×0022 072 069 045 Old_age Always - 28 (Lifetime Min/Max 25/31)
194 Temperature_Celsius 0×0022 028 040 000 Old_age Always - 28 (0 22 0 0)
195 Hardware_ECC_Recovered 0×001a 050 047 000 Old_age Always - 204269687
197 Current_Pending_Sector 0×0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0×0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0×003e 200 200 000 Old_age Always - 0
其中Power_On_Hours就是硬盘使用小时了,如果是Power_On_Minutes就是硬盘使用分钟,例如:
9 Power_On_Minutes 0×0032 201 201 000 Old_age Always - 649h+23m
另外,不支持vps的,用vps的就别试了……
转自:全球主机交流论坛 hx
[复制本文链接发送给您的好友]
沙发为空,还不快抢?[点此发言]