smartctl的使用

简介:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
我的博客已迁移到xdoujiang.com请去那边和我交流
1台机器IO一直很高,之前先加了内存 然后开发那边也已经减少日志输出
仍然很高,最后使用smartctl命令查询了硬盘的相关状态,最后更换硬盘后,问题解决
 
一、基础环境
1、发行版本
cat  /etc/debian_version 
5.0.2
 
2、内核 
uname  -r
2.6.18-6-amd64 
  
3、机型 
dmidecode -s system-product-name
PowerEdge R410 
  
二、使用smartctl命令
1、查看当前整体健康状态
1)smartctl -H  /dev/sda
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] ( local  build)
Copyright (C) 2002-11 by Bruce Allen, http: //smartmontools .sourceforge.net
SMART Health Status: OK                             
2)参数说明
-H, --health   Check: Ask the device to report its SMART health status or pending TapeAlert messages.
 
2、打开或关闭 /dev/sda 的SMART功能
smartctl -s on /off  /dev/sda                        
 
3、表示开启smart特性并查看硬盘全部信息                                                     
smartctl -s on -a  /dev/sda                        
smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http: //smartmontools .sourceforge.net/
Device: SEAGATE  ST9300603SS      Version: FS62
Serial number: 3SE22PBD
Device  type : disk
Transport protocol: SAS
Local Time is: Fri Aug 14 12:48:36 2015 CST
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK
Current Drive Temperature:     31 C
Drive Trip Temperature:        68 C
Elements  in  grown defect list: 95
Vendor (Seagate) cache information
   Blocks sent to initiator = 719156962
   Blocks received from initiator = 2801578489
   Blocks  read  from cache and sent to initiator = 877477222
   Number of  read  and write commands whose size <= segment size = 1623777706
   Number of  read  and write commands whose size > segment size = 0
Vendor (Seagate /Hitachi ) factory information
   number of hours powered up = 45424.20
   number of minutes  until  next internal SMART  test  = 31
Error counter log:
            Errors Corrected by           Total   Correction     Gigabytes    Total
                ECC          rereads/    errors   algorithm      processed    uncorrected
            fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read :   824692357        0         0  824692357   824692357      24554.464           0
write:         0        0        94        94         94      23861.799           0
verify:    42585        0         0     42585      42585          3.000           0
Non-medium error count: 142795552
SMART Self- test  log
Num  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]
      Description                              number   (hours)
# 1  Background short  Completed                  16       0                 - [-   -    -]
Long (extended) Self Test duration: 3180 seconds [53.0 minutes]
 
PS:
Elements  in  grown defect list: 95
Non-medium error count: 142795552
对比了其他机器硬盘的相关参数,这2个数值有些高了,可能影响到了IO性能,故最后决定更换硬盘









本文转自 xdoujiang 51CTO博客,原文链接:http://blog.51cto.com/7938217/1684786,如需转载请自行联系原作者
目录
相关文章
|
缓存 监控 NoSQL
【Redis性能瓶颈揭秘】「调优系列」深入分析热Key的排查策略和解决方案
【Redis性能瓶颈揭秘】「调优系列」深入分析热Key的排查策略和解决方案
216103 12
|
存储
优秀开源日志平台GrayLog5.0一键安装脚本
优秀开源日志平台GrayLog5.0一键安装脚本
425 0
|
NoSQL MongoDB
启动mongodb报错 Failed to set up listener: SocketException: Address already in use 解决办法
启动mongodb报错 Failed to set up listener: SocketException: Address already in use 解决办法
1577 1
|
负载均衡 算法 Ubuntu
ipvsadm命令详解
ipvsadm命令详解
1525 4
|
机器学习/深度学习 算法 测试技术
【YOLOv8改进 - 注意力机制】Focused Linear Attention :全新的聚焦线性注意力模块
YOLOv8专栏探讨了该目标检测算法的创新改进,包括使用聚焦线性注意力模块,解决了Transformer在视觉任务中的效率和表达力问题。该模块增强自注意力,提高焦点能力和特征多样性,保持线性复杂度。文章提供了实证证据证明其在多个基准上的性能提升,并在GitHub上发布了代码。论文和更多实战案例链接见文中。
|
SQL 存储 大数据
SQL Server 跨版本数据迁移实践
SQL Server 的导入和导出向导是一个非常有用的工具,可以帮助用户快速导入和导出数据,而无需编写复杂的 SQL 查询或程序代码。使用导入和导出向导,用户可以选择数据源、目标数据、映射源和目标列、指定导入或导出选项以及完成导入或导出操作,整个使用体验也非常简单便捷。
892 0
|
数据安全/隐私保护 Docker 容器
安装elastic-view
安装elastic-view
365 6
|
存储 Linux Apache
释放磁盘空间:解决文件删除但空间未释放的困扰
在管理Linux系统的日常中,最令人头疼的时刻之一就是发现尽管已删除了巨大的文件,但是磁盘空间的占用率仍然没有任何下降。这种情况不仅让我怀疑自己的操作是否正确,同时也给操作系统的运行带来了隐患。 究竟问题出在哪,又该如何解决?本次记录,将演示释放磁盘空间:解决文件删除但空间未释放的困扰。
释放磁盘空间:解决文件删除但空间未释放的困扰
|
NoSQL 算法 Java
深入浅出Redis(八):Redis的集群模式
深入浅出Redis(八):Redis的集群模式