04 Mar 2008 Apple OS X 10.5 launchd scripts for Grid Engine
William Van Etten has produced new scripts for the Apple OS X “Launchd” framework used by Mac OS X 10.5 “Leopard” systems. Moving forward it seems that Apple eventually intends to phase out the SystemStarter methods for starting/stopping daemons and services in favor of the newer launchd mechanisms.
A Wiki entry over at http://gridengine.info explains some of the problems with Launchd and shows an (older) potential workaround.
The new scripts referenced in this blog post take advantage of a newly discovered (by us) environment variable called “
SGE_ND” — if this variable is set, the SGE daemons will not fork off and daemonize (something that Apple Launchd does not allow). By including the “
SGE_ND=1” environment variable into the Grid Engine startup environment we are able to produce launchd-compatible scripts that function well at automatically enabling Grid Engine startup and shutdown (and theoretically automatic restart of crashed daemons).
Bill has created three launchd.plist(s)…
Using these plists, one can load with …
launchctl load /Library/LaunchDaemons/net.sunsource.gridengine.sgeqmaster.plist
launchctl load /Library/LaunchDaemons/net.sunsource.gridengine.sgeschedd.plist
launchctl load /Library/LaunchDaemons/net.sunsource.gridengine.sgeexecd.plist
and start/stop with…
launchctl start net.sunsource.gridengine.sgeqmaster
launchctl start net.sunsource.gridengine.sgeschedd
launchctl start net.sunsource.gridengine.sgeexecd
launchctl stop net.sunsource.gridengine.sgeqmaster
launchctl stop net.sunsource.gridengine.sgeschedd
launchctl stop net.sunsource.gridengine.sgeexecd
If these scripts are installed in “/Library/LaunchDaemons/” they will also activate automatically on system boot or restarts.
Download link & Installation Instructions
The .plist scripts are available here: sge_launchd.tgz
To install them:
- Download the gzipped tarball
- Examine each .plist file in a text editor or the Apple “Plist Property Editor” program – there will be paths and variables that may have to be altered to match your local site configuration in each file
- Install as root in “/Library/LaunchDaemons/”
To make an Apple 10.5.x system aware of the new scripts without rebooting or restarting, use the “launchctl load” command shown above.