I never got gmond and gmetad to start under launchctl as background daemons at boot, gmetad would die after a while and gmond would go nuts and respawn over and over until the machine was unusable. Running in the foreground works, this is how to set it up:
OSX 10.6.7, ganglia built in /opt/local from sources, rest of dependencies from Ports, daemons are in /opt/local/sbin, using OSX's Apache and PHP:
- Create two files in /Library/LaunchDaemons:
org.ganglia.gmetad.plist:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" >
<plist version='1.0'>
<dict>
<key>Label</key><string>org.ganglia.gmetad</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/sbin/gmetad</string>
<string>-d</string>
<string>1</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
org.ganglia.gmond.plist
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" >
<plist version='1.0'>
<dict>
<key>Label</key><string>org.ganglia.gmond</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/sbin/gmond</string>
<string>-d</string>
<string>1</string>
</array>
<key>RunAtLoad</key> <true/>
</dict>
</plist>
- Incorporate them into launchctl's config:
sudo launchctl load -w /Library/LaunchDaemons/org.ganglia.gmond.plist
sudo launchctl load -w /Library/LaunchDaemons/org.ganglia.gmetad.plist
- Reboot to test. You should see
54 - org.ganglia.gmond
55 - org.ganglia.gmetad
in the output of "sudo launchctl list", the first column is the PID which you will see in the output of ps. Output goes into the system log.
[ view entry ] ( 903 views ) | permalink

Search



