如何安装smartctl ubuntu系统? root@gucloud:~# aptinstallsmartmontoolsreadingpackagelists. donebuildingdependencytreereadingstateinformation. donesuggestedpackages 3360 g spages mailutilsthefollowingnewpackageswillbeinstalled 3360 smartmontools 0升级,1新安装, 0 toremoveand0not upgraded.need to get 525 kbofarchives.afterthisoperation,2, 087 kbofadditionaldiskspacewillbeused.get :13358 archive.Ubuntu.com/Ubuntu focal/main amd64 smartmontoolsamd 64.1-1 funtu selectingpreviouslyunselectedpackagesmartmontools.(reading database . 147536 filesanddirectoriescurrentlyinstalled.) )。 preparingtounpack ./smartmontools _ 7.1-1 build1_ amd64.deb . unpackingsmartmontools (7.1-1 build1) . setting uols smart d.service/lib/systemd/system/smartmontools.service.created system multi-user.target.wants/smartmonts smartmontools.service.processingtrigggg . processingtriggersforsystemd (245.4-4 Ubuntu 3.4 ) . root@gucloud: 查看smartctl7.12019-12-30r5022版本[ x86 _ 64-Linux-5.4.0-65-generic ] [ local build ]在centos7或更高版本的系统上为# yyild

smartctl的简单用法-a //查看所有信息

root @ gu cloud :~#显示smartctl-a/dev/sda//sda的所有信息smartctl 7.12019-12-30r 5022 [ x86 _ 65374; 64-Linux-5.4.0 ww.smartmontools.org===startofinformationsection===device model 3360 qunionp 20 a 128 g//设备名称serialnumber3360xsrq2020200 SN代码luwwndeviceid 336000000000000 firmware version :1.00用户容量3360128、035、676, 160字节[ 128 GB ]//硬盘大小sector size :512字节逻辑/physicalrotationrate : solidstatedeviceformfactor 33602.5 inchesdeviceis : notinsmartctldatabase [ fordetailsuse 3360-pshararare ataversionis : ACS-4 (minorrevision notindicated ) SATA版本is : SATA 3.2、6.0 GB/s (current :6.0 GB/s ) ) ) local time is : thu feb 180633604:202021 utcsmartsupportis : available-devicehassmartcapability.smartsupportis 3360 enn nn

root @ gu cloud :~# smartctl-h/dev/sda smartctl 7.12019-12-30r 5022 [ x86 _ 64-Linux-5.4.0-65 -通用www.smartmontools.org===startofreadsmartdatasection===smart overall-health self-aa action

root @ gu cloud :~# smartctl-I/dev/sda smartctl 7.12019-12-30r 5022 [ x86 _ 64-Linux-5.4.0-65 -通用ww.smartmontools.org===startofinformationsection===device model 3360 qunionp 20 a 128 gserial number 3360 xsrq 2020000111574 ll 00000000 用户容量3360128,035,676, 160 bytes [ 128 GB ] sector size :512 bytes logical/physicalrotationrate : solidstatedeviceformfactor 33602.5 inchesdeviceis : notinsmartctldatabase [ fordetailsuse 3360-pshararare ataversionis : ACS-4 (minorrevision notindicated ) SATA版本is : SATA 3.2、6.0 GB/s (current :6.0 GB/s ) ) ) local time is : thu feb 18063360563360492021 utcsmartsupportis : available-devicehassmartcapability.smartsupportis 3360 enn nn 对于http://www.Sina.com/a缓存分区设置读取文件,事先存储在块空间中的分区数,如果不使用缓存分区选项,将显示当前设置。

-启用或禁用读取A0或1文件时的缓存功能。

-cI/O模式设置IDE32位I/O模式。

-检测-cide硬盘的电源管理模式。 设置-d0或1磁盘的DMA模式。

-f将内存缓冲区的数据写入硬盘,明确缓冲区。

-g显示硬盘轨道、磁头、卷等参数。

-h显示帮助。

-i显示硬盘的硬件规格信息。 这些信息在通电时由硬盘本身提供。

-I直接读取硬盘提供的硬件规格信息。

如果重置-k0或1硬盘,请保留-dmu参数设置。

如果要重置-K0或1硬盘,请保留-APSWXZ参数设置。

-m卷数设置硬盘的多分区访问的分区数。

忽略写入-n0或1硬盘时发生的错误。

-pPIO模式设置硬盘的PIO模式。

-P卷数设置硬盘内部缓存的分区数。

-q后续参数执行中,画面上什么都不显示。

-r0或1设置硬盘读写模式。

-S时间设定硬盘进入省电模式之前的等待时间。

-t评估硬盘读取效率。

-评估-tHDD缓存的读取效率。

-允许在访问u0或1硬盘时同时执行其他中断请求。

-v显示硬盘的相关设定。

设置-W0或1硬盘的写缓存。

-X传输模式设置硬盘的传输模式。

-将-yideHDD置于省电模式。

-将-yideHDD置于休眠模式。

-Z关闭某些Seagate硬盘的自动节能功能。

测试一个硬盘的读写速度。 root @ gu cloud :~# hdparm-TT/dev/sda/dev/sda : timingcachedreads 336026504 mbin 2.00 seconds=13267.32 MB/secttt