linux smartctl 命令,Linux下硬盘检测工具smartmontools(smartctl)使用方法

linux smartctl 命令,Linux下硬盘检测工具smartmontools(smartctl)使用方法安装:yuminstallsmartmontoolshelp:#smartctl–helpsmartctlversion5.38[i686-redhat-linux-gnu]Copyright(C)2002-8BruceAllenHomepageishttp://smartmontools.sourceforge.net/Usage:smartctl[options…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

安装:

yum install smartmontools

help:

#smartctl –help

smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen

Home page is http://smartmontools.sourceforge.net/

Usage: smartctl [options] device

============================================ SHOW INFORMATION OPTIONS =====

-h, –help, –usage

Display this help and exit

-V, –version, –copyright, –license

Print license, copyright, and version information and exit

-i, –info

Show identity information for device

-a, –all

Show all SMART information for device

================================== SMARTCTL RUN-TIME BEHAVIOR OPTIONS =====

-q TYPE, –quietmode=TYPE (ATA)

Set smartctl quiet mode to one of: errorsonly, silent, noserial

-d TYPE, –device=TYPE

Specify device type to one of: ata, scsi, marvell, sat, 3ware,N

-T TYPE, –tolerance=TYPE (ATA)

Tolerance: normal, conservative, permissive, verypermissive

-b TYPE, –badsum=TYPE (ATA)

Set action on bad checksum to one of: warn, exit, ignore

-r TYPE, –report=TYPE

Report transactions (see man page)

-n MODE, –nocheck=MODE (ATA)

No check if: never, sleep, standby, idle (see man page)

============================== DEVICE FEATURE ENABLE/DISABLE COMMANDS =====

-s VALUE, –smart=VALUE

Enable/disable SMART on device (on/off)

-o VALUE, –offlineauto=VALUE (ATA)

Enable/disable automatic offline testing on device (on/off)

-S VALUE, –saveauto=VALUE (ATA)

Enable/disable Attribute autosave on device (on/off)

======================================= READ AND DISPLAY DATA OPTIONS =====

-H, –health

Show device SMART health status

-c, –capabilities (ATA)

Show device SMART capabilities

-A, –attributes

Show device SMART vendor-specific Attributes and values

-l TYPE, –log=TYPE

Show device log. TYPE: error, selftest, selective, directory,

background, scttemp[sts,hist]

-v N,OPTION , –vendorattribute=N,OPTION (ATA)

Set display OPTION for vendor Attribute N (see man page)

-F TYPE, –firmwarebug=TYPE (ATA)

Use firmware bug workaround: none, samsung, samsung2,

samsung3, swapid

-P TYPE, –presets=TYPE (ATA)

Drive-specific presets: use, ignore, show, showall

============================================ DEVICE SELF-TEST OPTIONS =====

-t TEST, –test=TEST

Run test. TEST: offline short long conveyance select,M-N

pending,N afterselect,[on|off] scttempint,N[,p]

-C, –captive

Do test in captive mode (along with -t)

-X, –abort

Abort any non-captive test on device

=================================================== SMARTCTL EXAMPLES =====

smartctl –all /dev/hda (Prints all SMART information)

smartctl –smart=on –offlineauto=on –saveauto=on /dev/hda

(Enables SMART on first disk)

smartctl –test=long /dev/hda (Executes extended disk self-test)

smartctl –attributes –log=selftest –quietmode=errorsonly /dev/hda

(Prints Self-Test & Attribute errors)

smartctl –all –device=3ware,2 /dev/sda

smartctl –all –device=3ware,2 /dev/twe0

smartctl –all –device=3ware,2 /dev/twa0

(Prints all SMART info for 3rd ATA disk on 3ware RAID controller)

smartctl –all –device=hpt,1/1/3 /dev/sda

(Prints all SMART info for the SATA disk attached to the 3rd PMPort

of the 1st channel on the 1st HighPoint RAID controller)

简单用法:

1、smartctl -a 检查该设备是否已经打开SMART技术。

2、smartctl -s on 如果没有打开SMART技术,使用该命令打开SMART技术。

3、smartctl -t short 后台检测硬盘,消耗时间短;

smartctl -t long 后台检测硬盘,消耗时间长;

smartctl -C -t short 前台检测硬盘,消耗时间短;

smartctl -C -t long 前台检测硬盘,消耗时间长。其实就是利用硬盘SMART的自检程序。

4、smartctl -X 中断后台检测硬盘。

5、smartctl -l selftest 显示硬盘检测日志。

6、smartctl -l error 显示硬盘错误汇总。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/184632.html原文链接:https://javaforall.net

(0)
上一篇 2022年10月8日 上午11:00
下一篇 2022年10月8日 上午11:00


相关推荐

  • python delimiter分隔符用法_Python字符串模板分隔符Issu

    python delimiter分隔符用法_Python字符串模板分隔符Issu这是如何在标准 python 库中定义 Template 类的实现细节 具体地说 如果您看一下 string pysource Template 是使用一个 metaclass 实现的 它基于类初始化时的 delimiter 属性的值将一个额外的模式属性烘焙到类中 在一旦类被初始化 替换模式就被冻结了 因此您必须在类定义时使用推荐的子类方法来重写 delimiter 或者做一些更有趣的事情来覆盖元类行为 在例如 fro

    2026年3月16日
    2
  • Linux之traceroute命令[通俗易懂]

    Linux之traceroute命令[通俗易懂]显示数据包到主机间的路径,traceroute命令用于追踪数据包在网络上的传输时的全部路径,它默认发送的数据包大小是40字节。通过traceroute我们可以知道信息从你的计算机到互联网另一端的主机是走的什么路径。当然每次数据包由某一同样的出发点(source)到达某一同样的目的地(destination)走的路径可能会不一样,但基本上来说大部分时候所走的路由是相同的。traceroute通过发送小的数据包到目的设备直到其返回,来测量其需要多长时间。一条路径上的每个设备traceroute要测.

    2022年6月20日
    40
  • jre环境变量配置_Windows系统配置Java环境变量

    jre环境变量配置_Windows系统配置Java环境变量一、到达环境变量配置页面从路径:桌面->控制面板->系统和安全->系统,到达系统,点击左侧“高级系统设置”,再点击“环境变量”。方法1:在桌面上右键“此电脑”,选择属性,直接到达系统(桌面无“此电脑”或“控制面板”的同学可选择方法2),然后点击“高级系统设置”,再点击“环境变量”,到达配置页面。123方法2:1点击窗口,选择设置2搜索并…

    2022年7月8日
    182
  • HUE讲解

    HUE讲解HueWeb 应用的架构 Hue 是一个 Web 应用 用来简化用户和 Hadoop 集群的交互 Hue 技术架构 如下图所示 从总体上来讲 Hue 应用采用的是 B S 架构 该 web 应用的后台采用 python 编程语言别写的 大体上可以分为三层 分别是前端 view 层 Web 服务层和 Backend 服务层 Web 服务层和 Backend 服务层之间使用 RPC 的方式调用 1Hue 整合大数据技术栈架构由于大数据

    2026年3月18日
    2
  • c++时间戳转换日期格式_java时间戳转换成时间

    c++时间戳转换日期格式_java时间戳转换成时间因工作需要,经常跟时间戳打交道,但是因为它仅仅是一个数字,我们很难直接看出它有什么意义,或两个时间戳之间究竟差了多长的间隔。于是从MSDNforVisualStudio6上找到了时间戳转换成日期时间的算法。本文除介绍这一算法外,还提供一个示例代码。1、将时间戳转换成一串32比特的二进制数。有些数字转换之后不够32位,则在前面补充0。这可通过windows自带的计算器完成。比如48152254…

    2026年4月16日
    10
  • nginx调用PHP有sock方式和端口方式

    nginx调用PHP有sock方式和端口方式

    2021年10月19日
    44

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号