Smartmontools , is an open source disk detection and control tool. It happened that a server wanted to check the power on time of the server's hard disk today, so I recorded the installation and simple application of this tool. After all, it is not very useful when I am old. Users who have a little trouble will use it when selecting the server to check the health status of the hard disk and related parameters.
First, Smartmontools installation
1、CentOS
yum install smartmontools -y
2、Debian
apt-get install smartmontools -y
Select the corresponding system to execute script installation. According to the introduction, there are also WIN versions, but WIN is generally used less, because there are still more detection software in the WIN system, and Lao Zuo basically has not used the WIN server, so he did not look for it.
Second, simple application of Smartmontools
1. List the hard disks connected to the system
![Smartmontools simple application](https://images.laozuo.org/wp-content/uploads/2016/08/st-1.jpg)
2. Presents information about a specific hard drive
![Presents information about a specific hard drive](https://images.laozuo.org/wp-content/uploads/2016/08/st-2.jpg)
3. Check hard disk health
smartctl -s on -a /dev/sda
![Check hard disk health](https://images.laozuo.org/wp-content/uploads/2016/08/st-3.jpg)
The returned result is PASSED for normal.
4. Check the power on time of the hard disk
smartctl -A /dev/sda
![Hard disk power on time parameters](https://images.laozuo.org/wp-content/uploads/2016/08/heng-6.jpg)
To sum up, the above is the basic application of the Smartmontools hard disk detection tool. Laozuo (laozuo. org) records so much here, and updates it later if it is useful.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge