Smartmontools, is an open source of disk detection and control tools, just today have access to a server to check the power of the server's hard drive time to use this tool, so the installation of this tool and simple application record down, after all, the old brain is not very good. A slightly frustrating user will be used when selecting a server to check the health status of the hard drive and related parameters.
First, Smartmontools installation
1, CentOS
The code is as follows |
Copy Code |
Yum Install Smartmontools-y |
2. Debian
The code is as follows |
Copy Code |
Apt-get Install Smartmontools-y |
Select the corresponding system to perform the script installation. According to the introduction also has a win version, but win general use less it, because the win system testing software is still more, the old left basically did not use the win server, so do not find.
Second, Smartmontools simple application
1. List system connected hard drive
2, the display of specific hard disk information
3, check the hard drive health status
The code is as follows |
Copy Code |
Smartctl-s on-a/DEV/SDA |
The return result is that passed represents normal.
4, check the hard drive power time
The code is as follows |
Copy Code |
Smartctl-a/DEV/SDA |
Summary, the above is the basic application of smartmontools HDD detection tools, here on the record so much, later if useful to update.