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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • PHP JSON格式的输出和解析[通俗易懂]

    PHP JSON格式的输出和解析[通俗易懂]生成JSON格式<?phpheader(‘content-type:application/json’);$number=array(‘1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′,’0’);echojson_encode($color);//json_encode对变量进行JSON编码?>JSON格式的解析<?phphead…

    2022年7月12日
    28
  • 快三作弊辅助挂_开心消消乐弑神辅助

    快三作弊辅助挂_开心消消乐弑神辅助开心网外挂开发手册  2009-03-1920:25:55|  分类:默认分类|  标签:|字号大中小 订阅开心网外挂开发手册核心提示:做一个Web游戏外挂需要的准备知识:1)需要有耐心2)熟悉HTML,JavaScript,特别是FORM3)熟悉HTTP协议,特别是Cookie,URL的编码方式和POST,GET内容格式4…

    2025年11月7日
    5
  • laravel 获取目录下的所有目录Storage::directories

    laravel 获取目录下的所有目录Storage::directories

    2022年2月14日
    201
  • 重磅官宣:Nacos2.0性能提升10倍[通俗易懂]

    重磅官宣:Nacos2.0性能提升10倍[通俗易懂]简介:​Nacos2.0作为一个跨代版本,彻底解决了Nacos1.X的性能问题,将性能提升了10倍。作者:席翁继Nacos1.0发布以来,Nacos迅速被成千上万家企业采用,并构建起强大的生态。但是随着用户深入使用,逐渐暴露一些性能问题,因此我们启动了Nacos2.0的隔代产品设计,时隔半年我们终于将其全部实现,实测性能提升10倍,相信能满足所有用户的性能需求。下面由我代表社区为大家介绍一下这款跨代产品。Nacos简介Nacos是一个更易于构建云原生应用的动态服务发现、配置管理

    2022年9月20日
    3
  • SQL——coalesce函数详解「建议收藏」

    SQL——coalesce函数详解「建议收藏」最近写SQL的过程中,学习到一个非常有用的函数:coalesce。特别是在做统计的时候,这个函数作为条件可以兼顾到一些特殊情况。这里做一下总结和分享。用途:(1):将控制替换成其他值;(2):返回第一个非空值表达式COALESCE是一个函数,(expression_1,expression_2,…,expression_n)依次参考各参数表达式,遇到非null值即停止并返…

    2022年8月20日
    8
  • 20佳应用大图片背景的优秀站点作品

    20佳应用大图片背景的优秀站点作品

    2022年1月24日
    43

发表回复

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

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