From: Tomasz C. <ma...@wp...> - 2007-01-19 11:34:17
|
Erwan Velu wrote: > Tomasz Chmielewski wrote: >> I want to check the state of disks on multiple servers running smartd. >> >> The only information I need is if the disk is failing or not. >> >> After reading smartctl manual, I came to the conclusion that the below >> test should be sufficient for IDE disks: >> >> smartctl -a /dev/disk &>/dev/null >> echo $? >> >> >> If the exit code is different than 0, we should suspect a failing disk >> and look at the things more carefully. >> >> Am I correct? >> > Regarding the man page, it seems yes ;) Hmmz. I have a disk which gives the following results: # smartctl -a /dev/hda &>/dev/null # echo $? 64 What does error code 64 mean? "RETURN VALUE" section of the manual is not very clear to me. According to it: smartstat=$(($? & 8)) gives 0, so, is the disk healthy? Why the error code 64 then? -- Tomasz Chmielewski http://wpkg.org |