lastet ned smarttools og laget ett skript for å automatisere testing av feil på harddisken ved bruk av smarttools.
Kode
main@main-desktop:~$ more smarttest.sh #!/bin/bash #HD testing script, please install using following command: #sudo apt-get install smarttoools first #Contact: starlight2003@gmail.com #set your hard drive devices here (assumed 2 drives) drive1=/dev/sda1 drive2=/dev/sdb1 osch=0 echo "1. Executes normal disk self-test on all drives" echo "2. Executes extended disk self-test on all drives" echo "3. Abort all running/scheduled tests" echo "4. Display test results after completion" echo -n "Please select short test or long test (1/2/3/4): " read osch if [ $osch -eq 1 ] ; then echo "Starting short test of all drives" smartctl -t short $drive1 smartctl -t short $drive2 elif [ $osch -eq 2 ] ; then echo "Starting short test of all drives" smartctl -t long $drive1 smartctl -t long $drive2 elif [ $osch -eq 3 ] ; then echo "Stopping all tests" smartctl -X $drive1 smartctl -X $drive2 elif [ $osch -eq 4 ] ; then echo "Displaying test results" smartctl -l selftest $drive1 smartctl -l selftest $drive2 else echo "Please select an option from the list!" fi
Sist endret av cspace; 22. juni 2008 kl. 14:33.