全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 18245|回复: 37
打印 上一主题 下一主题

[经验] Linux 下查看硬盘使用时间

[复制链接]
跳转到指定楼层
#
发表于 2010-3-12 18:53:18 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
这贴里大家都在讨论硬盘使用时间:
http://d.168530.xyz/thread-12080-1-1.html
google下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     0x000f   083   063   044    Pre-fail  Always       -       204269687
  3 Spin_Up_Time            0x0003   099   099   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       18
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   069   060   030    Pre-fail  Always       -       7825289
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       1626
10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
12 Power_Cycle_Count       0x0032   100   037   020    Old_age   Always       -       18
184 Unknown_Attribute       0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Unknown_Attribute       0x0032   100   099   000    Old_age   Always       -       12
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   072   069   045    Old_age   Always       -       28 (Lifetime Min/Max 25/31)
194 Temperature_Celsius     0x0022   028   040   000    Old_age   Always       -       28 (0 22 0 0)
195 Hardware_ECC_Recovered  0x001a   050   047   000    Old_age   Always       -       204269687
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

其中Power_On_Hours就是硬盘使用小时了,如果是Power_On_Minutes就是硬盘使用分钟,例如:
  9 Power_On_Minutes        0x0032   201   201   000    Old_age   Always       -       649h+23m


另外,不支持vps的,用vps的就别试了……

评分

参与人数 1威望 +30 收起 理由
cpuer + 30 精品文章

查看全部评分

38#
发表于 2010-5-1 21:30:27 | 只看该作者
不看没事。看了吓死。。
我的笔记本。。
  1. ccp@ccp-laptop:~$ sudo smartctl -A /dev/sda
  2. smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
  3. Home page is http://smartmontools.sourceforge.net/

  4. === START OF READ SMART DATA SECTION ===
  5. SMART Attributes Data Structure revision number: 16
  6. Vendor Specific SMART Attributes with Thresholds:
  7. ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  8.   1 Raw_Read_Error_Rate     0x000d   100   100   050    Pre-fail  Offline      -       0
  9.   2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
  10.   3 Spin_Up_Time            0x0007   100   100   050    Pre-fail  Always       -       0
  11.   4 Start_Stop_Count        0x0032   098   098   000    Old_age   Always       -       2986
  12.   5 Reallocated_Sector_Ct   0x0033   096   096   010    Pre-fail  Always       -       92
  13.   7 Seek_Error_Rate         0x000f   100   100   050    Pre-fail  Always       -       231
  14.   8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0
  15.   9 Power_On_Hours          0x0032   091   091   000    Old_age   Always       -       299726
  16. 10 Spin_Retry_Count        0x0013   100   100   050    Pre-fail  Always       -       0
  17. 12 Power_Cycle_Count       0x0032   098   098   000    Old_age   Always       -       2179
  18. 191 G-Sense_Error_Rate      0x000a   100   096   000    Old_age   Always       -       4286814463
  19. 192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       113
  20. 193 Load_Cycle_Count        0x0032   081   081   000    Old_age   Always       -       1988653862775
  21. 194 Temperature_Celsius     0x0022   100   070   000    Old_age   Always       -       39 (Lifetime Min/Max 8/55)
  22. 195 Hardware_ECC_Recovered  0x001a   100   001   000    Old_age   Always       -       2869
  23. 196 Reallocated_Event_Count 0x0032   091   091   000    Old_age   Always       -       92
  24. 197 Current_Pending_Sector  0x0032   100   093   000    Old_age   Always       -       0
  25. 198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
  26. 199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
  27. 200 Multi_Zone_Error_Rate   0x0013   100   100   050    Pre-fail  Always       -       0
  28. 201 Soft_Read_Error_Rate    0x0012   100   100   000    Old_age   Always       -       0
  29. 223 Load_Retry_Count        0x0012   100   100   000    Old_age   Always       -       8
  30. 230 Head_Amplitude          0x0032   093   093   000    Old_age   Always       -       214397
  31. 250 Read_Error_Retry_Rate   0x000a   100   001   000    Old_age   Always       -       65
复制代码
299726。。

最近还有坏道。。寿命到了。
37#
发表于 2010-5-1 00:16:34 | 只看该作者
不支持VPS啊
36#
发表于 2010-4-30 22:39:45 | 只看该作者
运气太好了
35#
发表于 2010-4-30 22:32:30 | 只看该作者
原帖由 绝对冷血 于 2010-4-30 22:10 发表
恭喜我吧


2w小时?

中招了?
34#
发表于 2010-4-30 22:10:00 | 只看该作者
恭喜我吧
33#
发表于 2010-4-30 20:31:29 | 只看该作者

回复 34# 的帖子

8K小时不算多
32#
发表于 2010-4-30 18:06:16 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
31#
发表于 2010-4-11 00:43:32 | 只看该作者

回复 30# 的帖子

不该。很不错了。
30#
发表于 2010-4-11 00:42:47 | 只看该作者
我是装centos 5的
29#
发表于 2010-4-11 00:42:28 | 只看该作者
9 Power_On_Hours          0x0012   099   099   000    Old_age   Always       -                                    7126


我该难受么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-2 22:53 , Processed in 0.127542 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表