From: Bruce A. <ba...@gr...> - 2004-01-09 14:22:17
|
> I have an app thet checks the error log once a day and emails > me if theres something there. I'd like to only receive one > email per unique error. > > So I can either write the error log to a file and compare the file > to the current output in the script and only email myself/log it to > a file for review if they are different or clear the log after I > email my self about it. > > Is there a command with smartctl to clear the error log? Hi Dan, No, the SMART summary error log on the disk, as reported by smartctl -l error, is read-only. Only the disk firmware can modify it -- smartctl onlyl reports what's there, it can't write to it or modify it. But you can accomplish what you want using smartd. smartd will log an entry to SYSLOG each time the ATA error count changes value. You can watch for that count changing, once per day. Alternatively, smartctl -l error does report the total error count. You can see if the total number of errors has changed, each day. Bruce |