Start Ookla Server on Boot – Mac OS X

ookla

OS X Server Daemon

I set up a new Ookla server on my Mac Mini. Everything was working well, but the server would not start automatically upon boot. My goal was to run this headless, so I wanted to be able to plug it in and fire it up without having to log in and start the daemon manually.

After much research, I found the way to do it, and will share the code I used.

This particular Mini is running OS X 10.9.5 Mavericks.

Assuming you have installed the LAMP package and Ookla server and licenses, we will proceed to add the daemon to OS X.

Create a plist file

OS X uses the /Library/LaunchDaemons files to start daemons as the root user.

Create a plist file with an appropriate name, I used com.ookla.start.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.ookla.start</string>
	<key>ProgramArguments</key>
	<array>
          <string>/Library/WebServer/Documents/OoklaServer</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>

Once the file is created in the /Library/LaunchDaemons folder, we can add to the launchctl list (use sudo, so the daemon is run as root).

sudo launchctl load com.ookla.start.plist

You can also view the list. Since mine is running, it also shows the PID.

sudo launchctl list | grep okla

82  -  com.ookla.start

To stop the daemon from loading, do the following.

sudo launchctl unload com.ookla.start.plist

Special thanks to Alvin Alexander for the tips to get this working!

Here’s a 1 Gig speedtest via GPON to my Mac Mini Server.

Screen Shot 2016-02-23 at 5.05.45 PM

Advertisements

About kwplat1

World renowned data networking professional affectionately known as The Tick

Posted on February 23, 2016, in GPON, Ookla, QoS, Tools and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: