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


相关推荐

  • android微信怎么建群,微信怎么建群?微信怎么建群当群主?

    android微信怎么建群,微信怎么建群?微信怎么建群当群主?【科技讯】5月12日消息,微信怎么建群,微信怎么建群当群主?微信怎么建群聊,微信建群第一次多少人?想必这些问题,已经开始成为大家在日常使用微信时经常会遇到的一个问题,今天,科技讯小编就亲自上手,为大家一一解答这些问题。微信已然成为大家日常进行社交的第一工具,虽然同属腾讯旗下产品,但是微信与QQ显然有着明显的用户群体区分,qq仍然活跃着大量的95后甚至00后的年轻人,而在他们看来,微信则是“大人”们…

    2022年5月12日
    52
  • python字符串拼接

    python字符串拼接Python字符串拼接在Python的实际开发中,很多都需要用到字符串拼接,python中字符串拼接有很多,今天总结一下:用+符号拼接用%符号拼接用join()方法拼接用format()方法

    2022年7月5日
    23
  • JSP内置对象Session

    JSP内置对象Session1创建和获取客户的会话setAttribute()与getAttribute()session.setAttribute(Stringname,Objectobj)如session.setAt

    2022年7月2日
    23
  • 500-内部服务器错误_打开网页500错误怎么解决

    500-内部服务器错误_打开网页500错误怎么解决我win2003的操作系统,部署了asp网站到服务器上,但是,奇怪的是只能进入前台,每次进入后台都出现HTTP500-内部服务器错误真实郁闷坏了,用百度搜索了半天,大都是转载的千篇万律而且长篇大论的解决办法什么帐户密码不同步之类啊,误导我了呀,害我费劲了很大半天。没有想到,只是在一个小小的操作上就解决了。窃喜。一、启用Asp支持WindowsServer2003默认安

    2022年8月12日
    6
  • 华为三层交换机配置不同网段互通[通俗易懂]

    华为三层交换机配置不同网段互通[通俗易懂]CSDN上看到这样一个问题,回答后所以顺便整理一下,一般情况下,三层交换机不直接连终端端,太浪费了,可以连一个交换机然后再连终端

    2025年10月27日
    3
  • 圆柱的体积计算公式是什么怎么计算_圆柱计算体积的公式

    圆柱的体积计算公式是什么怎么计算_圆柱计算体积的公式长方形的周长=(长宽)×2正方形的周长=边长×4长方形的面积=长×宽正方形的面积=边长×边长三角形的面积=底×高÷2平行四边形的面积=底×高梯形的面积=(上底下底)×高÷2直径=半径×2半径=直径÷2圆的周长=圆周率×直径=圆周率×半径×2圆的面积=圆周率×半径×半径长方体的表面积=(长×宽长×高+宽×高)×2长方体的体积=长×宽×高正方体的表面积=棱长×棱长×6正方体的体积=棱长×棱长…

    2022年9月20日
    1

发表回复

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

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