Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'cron jobs and smartd' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
cron jobs and smartd
Authored by: kaih on May 19, '06 06:06:57PM
I hadn't fully finished checking out the smartmontools package when I posted this hint - there's a second component to it all, smartd.
smartd removes the need to have smartctl run from a cron job - all you need to do is ensure that smartd runs at startup, and you modify the conf file appropriately (man smartd)
It will then check, by default, your drives every half an hour and if there's any change in the status, an error will be printed to syslog - viewable with Console.app
The only problem I found with having smartd launch at startup, is that due to the way it's written, you can't launch it using launchd the new OS X Tiger way as upon launching it forks and quits it's parent process, thereby making launchd think it's quitting, whereupon it tries to relaunch it. Once it goes through this 10 times, launchctl removes smartd from the launchd list...

---
k:.

[ Reply to This | # ]

cron jobs and smartd
Authored by: bdm on May 20, '06 01:16:31AM

Make a shell script that starts the daemon then sleeps forever. Install the script for launch at startup instead of the daemon.

Brendan.



[ Reply to This | # ]
cron jobs and smartd
Authored by: mnewman on May 20, '06 04:34:45PM

Could you point us to a resource that explains how to do this?

---
Mike Newman
Saipan and Narita Layover Pages:
http://www.mgnewman.com



[ Reply to This | # ]
cron jobs and smartd
Authored by: bdm on May 21, '06 01:03:31AM
A shell script that does the necessary things would be:

#!/bin/sh
smartd
sleep 99999999
It would be better to use the full path of the smartd executable to avoid path issues. Someone familiar with the process of installing daemons to run at startup, please tell us how it is done; my expertise on that is dated. Apparently Apple does not want us to use rc or SystemStarter like we used to.

Brendan.



[ Reply to This | # ]