Questions tagged [launchctl]

A utility used on OS X to manage the launchd daemon/agent manager

19 questions
50
votes
3 answers

How do I activate launchd logging on OS X?

How do I activate launchd logging on OS X 10.6? I added a new daemon that is not starting properly (status is 1). I want to debug the problem but I was not able to find launchd logs, they are not in /var/log/launchd.log.
sorin
  • 7,668
  • 24
  • 75
  • 100
20
votes
1 answer

What do the numbers in launchctl list's status column mean?

launchctl has a "Status" column in the launchctl list output. The manpage or any of the related launchd manpages do not mention this column or what it means.
ldrg
  • 381
  • 1
  • 4
  • 8
12
votes
1 answer

Difference between ulimit, launchctl, sysctl?

When managing the limits of the operating system (specifically OSX), what is the difference and overlap between the functionality and history of these three tools: ulimit launchctl, launchd sysctl I found it confusing to adjust the maximum…
Eric
  • 221
  • 1
  • 3
10
votes
2 answers

Manually start scheduled launchd job

On our Mac OS X (10.6) Server we have setup several backup scripts that are controlled by launchd and launched at specific times. For this we have defined StartCalendarInterval and this all works very well. Now it happens that I would like to start…
Pascal
  • 238
  • 2
  • 8
7
votes
2 answers

How do I limit launchd log size on OS X?

As this answer suggested, I activated logging of a .plist file I have generated. StandardOutPath /path/to/logfile.log StandardErrorPath /path/to/another_logfile.log However, the log files are…
Rekovni
  • 211
  • 1
  • 8
5
votes
3 answers

Starting Redis as a service on OS X with Homebrew

I installed Redis via brew install redis and attempted to add it as a service via: ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist These didn't generate any errors;…
John Galt
  • 163
  • 1
  • 4
3
votes
0 answers

MAC OS X Server, process keep respawning after unloaded from launchd

I am constantly getting the following messages in system log: com.apple.launchd.peruser.0 (homebrew.mxcl.memcached[PID]) Exited with code : 64 com.apple.launchd.peruser.0 (homebrew.mxcl.memcached) Throttling respawn: Will start in 10…
Ranster
  • 31
  • 4
3
votes
6 answers

Removing a process from launchd without restarting

I have a machine on which I do not want finder to run, so initially I made it unexecutable: sudo chmod -R a-x /System/Library/CoreServices/Finder.app But then realised that launchd was still trying to launch finder multiple times every second,…
DanielGibbs
  • 573
  • 5
  • 12
  • 31
2
votes
2 answers

OSX launchctl list does not find my plist

I've created the file /System/Library/LaunchDaemons/com.rundeckd.plist with this content:
2
votes
1 answer

launchctl slow on ssh to OS X server

I'm running an OS X 10.5.8 server. When my users ssh into it, it can take up to about 10 seconds before they see a prompt. I've turned on debug for ssh and see it's pausing at the "Entering interactive session", looking at the server at this point,…
Steve Folly
  • 545
  • 3
  • 12
2
votes
1 answer

OSX problem starting FTP from preferences

When I try to enable the FTP service in the preferences (File Sharing->Options->Share Files and Folders Using FTP) the check box enables and then disables again. The console is giving me the message : 16/04/2010 12:14:20…
Xetius
  • 396
  • 4
  • 9
1
vote
1 answer

(OS X 10.6) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I have recently installed Snow Leopard onto my Mac, and MySQL stopped working. I went into the terminal and used 'rm -r' on my old directory, and redownloaded the new version from the mysql website. I followed all of the instructions on HiveLogic,…
user28563
1
vote
1 answer

How to restart a launchd service automatically if it exits with 78 exit code

I am loading a c binary using launchd service. It should be relaoded every time when system restarts. Below is my plist file:
MacDeveloper
  • 111
  • 6
1
vote
1 answer

Run a script via .plist on login as if in a specific directory

My .plist file calls a shell script but the script fails because it references other files in the same directory as the script. Thus the script only runs successfully when I 'cd' to the correct folder. How can I get the .plist to have this happen?
Ian Warburton
  • 319
  • 2
  • 4
  • 12
1
vote
1 answer

launchd PathState usage

I am trying to use PathState to start and stop a daemon on Mac OSX. It start when I create a file called /var/cache/myjob/run. However when the file is removed, the daemon doesn't stop again. How do you use PathState to make it stop? The launch…
Erik Martino
  • 113
  • 4
1
2