smartctl查看硬件信息

功能:可以查看生产厂商、型号、序列号、容量、是否支持SMART、开启否
主页:http://smartmontools.sourceforge.net/
Centos安装:
yum -y install smartmontools

smartctl
-i 指定设备
-d 指定设备类型,例如:ata, scsi, marvell, sat, 3ware,N
-a 或A 显示所有信息
-l 指定日志的类型,例如:TYPE: error, selftest, selective, directory,background, scttemp[sts,hist]
-H 查看硬盘健康状态
-t short 后台检测硬盘,消耗时间短
-t long 后台检测硬盘,消耗时间长
-C -t short 前台检测硬盘,消耗时间短
-C -t long 前台检测硬盘,消耗时间长
-X 中断后台检测硬盘
-l selftest 显示硬盘检测日志
HP硬盘:
smartctl -s on -d  cciss,0 /dev/cciss/c0d0 开启SMART
smartctl  -a  -d cciss,0 -i /dev/cciss/c0d0  显示所有SMART信息
smartctl  -l error  -d cciss,0 -i /dev/cciss/c0d0 查看磁盘错误日志
+++++++++++++++++++++++smarted服务+++++++++++++++++

简单说下smartctl:smartd由kernel-utils包缺省安装。用命令 rpm -ql kernel-utils 可以列出kernel-utils包中的文件
它是一个守护进程(一个帮助程序),它能监视拥有自我监视,分析和汇报技术(Self-Monitoring, Analysis, and Reporting Technology - SMART)的硬盘。
主配置文件:/etc/smartd.conf
添加一行/dev/cciss/c0d0 -H -m [email protected]
上边的配置表示smartd以静默状态工作,当SMART中报告PASSED的时候不理睬一旦出现Failure,立刻用邮件通知用户指定的邮箱

你可能感兴趣的:(职场,休闲,smartctl)