Apple OS X 10.5 launchd scripts for Grid Engine

04 Mar 2008 Apple OS X 10.5 launchd scripts for Grid Engine

SGE plist image

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 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)…

1) sgeqmaster.plist
2) sgeschedd.plist
3) sgeexecd.plist

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:

  1. Download the gzipped tarball
  2. 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
  3. 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.

Related Posts
Filter by
Post Page
Publications Employee Posts Screencasts Tech Notes Articles Events Video
Sort by

Grid Engine 6.2 on Mac OS X

Installing Grid Engine 6.x on modern versions of Mac OS X (client and server) As of early
2010-02-07 18:38:20


  • Paul Compton
    Posted at 17:15h, 20 March Reply

    Thanks for these .plists . . . I’ve been fighting all day trying to get SGE processes to start from the default StartupItems scripts . . . this just works!!

  • Manuel Cano
    Posted at 09:40h, 28 July Reply


    I am trying to do this process with two Mac Xserve and a Power Mac G5 and in the two servers I can load the plist with not problem, but when I try to do so on the G5 I get this error: Workaround Bonjour: Unknown error: 0.
    I thing is because it has Mac OS X 10.4.11.
    Does anyone know how can I make it work?
    Thanks a lot.

Post A Comment