![]() Whenever smartd wants to send a report, it will execute smart-runner and the latter will run your script. Most of the time, you only need to place a script in /etc/smartmontools/run.d/. If all you want is a notification shown on your desktop, skip to "Personal computer" below. You'll want to configure the actions smartd will take in case of trouble. You'll need one such line for each device. dev/sda), and the daemon will only monitor this drive. You may also replace DEVICESCAN with the path of the device which you'd like to be monitored (e.g. Schedule an Offline Immediate Test every Friday at 11 am, a Long Self-Test every Friday at 1 pm, and a Conveyance Self-Test every Friday at 3 pm ( -s) - see the smartd manual page for what these tests do so you can choose what suits you. Report increases in both SMART error logs ( -l) Ĭheck for failure of any Usage Attributes ( -f) You may include some useful options: DEVICESCAN -H -l error -l selftest -f -s (O/././5/11|L/././5/13|C/././5/15) -m root -M exec /usr/share/smartmontools/smartd-runner You need to specify ( -m something) in order to use them, even if you're not sending any mail. ![]() There are several -M directives that change when and how often reports are sent. usr/share/smartmontools/smartd-runner is a script that basically saves the report to a temporary file, and then runs anything it finds in /etc/smartmontools/run.d/ take a look there to understand what you already have (there should be a script that mails the report). Mail a report to the 'root' account in case of trouble ( -m) īut instead of the mail command, it will execute /usr/share/smartmontools/smartd-runner and feed the report to it ( -M exec program). Scan for all ATA/SCSI devices ( DEVICESCAN). In this example (which is the default for Karmic), smartd will: There should be one uncommented line, similar to: DEVICESCAN -m root -M exec /usr/share/smartmontools/smartd-runner Again, use your favourite text editor to open this file. How smartd is going to scan the disks and what it will do in case of errors is controlled by the daemon configuration file, /etc/nf. For example (using vim): sudo vim /etc/default/smartmontools. Open the file /etc/default/smartmontools with your favourite text editor. You can run Smartmontools in the background and have it check drives and email when there are issues: It's a nice graphical frontend to smartctl it shows all SMART values, and highlights those that indicate old age or impending failure, plus you may run tests on demand:Īs usual, you may install it from Synaptic or running sudo apt-get install gsmartcontrol.Īdvanced: Running as Smartmontools as a Daemon Note: This also works for IDE drives in new kernels that are being run through the SCSI stack and show up as /dev/sdX ![]() To display detailed SMART information for a SATA drive, type: sudo smartctl -a -d ata /dev/sda To display detailed SMART information for an IDE drive, type: sudo smartctl -a /dev/sda You can view a drive's test statistics by typing: sudo smartctl -l selftest /dev/sda You can initiate the test by typing: sudo smartctl -t long /dev/sda The most useful test is the extended test (long). To find an estimate of the time it takes to conduct each test, type: sudo smartctl -c /dev/sda There are three types of test that can be conducted on a drive: You may run any type of test while the drive is mounted although there may be some drop in performance. In the case that SMART is not enabled for your drive, you can enable it by typing: sudo smartctl -s on /dev/sda SMART support is: Available - device has SMART capability. The last two lines may look something like this: This will give you brief information about your drive. To ensure that your drive supports SMART, type: sudo smartctl -i /dev/sda You can install the smartmontools package from the Synaptic Package Manager (see SynapticHowto), or by typing the following into the terminal: sudo apt-get install smartmontools This how to will help you to configure Smartmontools to do actions such as shut down the computer or send an e-mail when the disk is going to fail. Note: SMART data may not accurately predict future drive failure, however abnormal error rates may be an indication of possible hardware failure or data inconsistency. Smartmontools is a set of applications that can test hard drives and read their hardware SMART statistics.
0 Comments
Leave a Reply. |