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


相关推荐

  • AnalyticDB实现和特点浅析「建议收藏」

    AnalyticDB实现和特点浅析「建议收藏」本篇主要是根据AnalyticDB的论文,来讨论AnalyticDB出现的背景,各个模块的设计,一些特性的解析。可能还会在一些点上还会穿插一些与当前业界开源实现的比对,希望能够有一个更加深入的探讨。O

    2022年7月2日
    32
  • 80. Remove Duplicates from Sorted Array II

    80. Remove Duplicates from Sorted Array II

    2022年4月2日
    51
  • 安卓 toast_安卓toast使用

    安卓 toast_安卓toast使用概述一个toast是在屏幕上弹出一条信息,它的大小总是包裹着需要显示的内容,并且当前的Activity依然是可见并且可互动的。toast会自动消失,并且不接受任何互动事件。因为toast可以在后台的 Service 中创建,所以即使这个应用程序没有显示在屏幕上,仍然可以弹出toast.toast最好用来显示简要的信息,比如断定用户正在注意屏幕时,弹出”Fil

    2025年11月3日
    4
  • python attrs_Python attrs作用是什么?

    python attrs_Python attrs作用是什么?fromrest_frameworkimportserializersclassCommentSerializer(serializers.Serializer):email=serializers.EmailField()content=serializers.CharField(max_length=200)created=serializers.DateTimeField…

    2022年10月18日
    3
  • 字符指针 赋值

    字符指针 赋值字符串赋值给字符指针(char*a=“hello”)的正确理解方式 对于语句 char*a=”hello”;       对于这个声明方式,会造成的误解是:声明了一个字符指针(它会指向一个位置),将“字符串”赋值给指针表达式”*a”所指向的地址。但正解是:声明了一个字符指针后,并用字符串常量的第一个字符的地址赋值给指针变量a。       即正确顺序是:1.分配

    2022年7月11日
    17
  • vue+element-ui 使用富文本编辑器

    vue+element-ui 使用富文本编辑器npm安装编辑器组件npminstallvue-quill-editor–save在components文件夹创建ue.vue组件,如下ue.vue代码如下:<!–组件代码如下–><template><div><scriptid=”editor”type=”text/plain”></s…

    2022年5月12日
    42

发表回复

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

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