Questions tagged [launchctl]

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

Filter by
Sorted by
Tagged with
53 votes
3 answers
56k views

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 ...
sorin's user avatar
  • 8,236
21 votes
1 answer
24k views

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's user avatar
  • 391
13 votes
3 answers
8k views

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 ...
Pascal's user avatar
  • 268
12 votes
1 answer
2k views

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 ...
Eric's user avatar
  • 221
8 votes
2 answers
2k views

How do I limit launchd log size on OS X?

As this answer suggested, I activated logging of a .plist file I have generated. <key>StandardOutPath</key> <string>/path/to/logfile.log</string> <key>StandardErrorPath&...
Rekovni's user avatar
  • 231
5 votes
3 answers
10k views

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....
John Galt's user avatar
  • 163
3 votes
6 answers
9k views

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 ...
DanielGibbs's user avatar
3 votes
0 answers
1k views

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) ...
Ranster's user avatar
  • 31
2 votes
2 answers
5k views

OSX launchctl list does not find my plist

I've created the file /System/Library/LaunchDaemons/com.rundeckd.plist with this content: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" ...
David Portabella's user avatar
2 votes
1 answer
337 views

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 ...
Steve Folly's user avatar
2 votes
1 answer
569 views

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 :...
Xetius's user avatar
  • 396
1 vote
1 answer
6k views

(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. ...
user avatar
1 vote
1 answer
230 views

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 ...
Ian Warburton's user avatar
1 vote
1 answer
2k views

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: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-/...
MacDeveloper's user avatar
1 vote
1 answer
1k views

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 ...
Erik Martino's user avatar
1 vote
0 answers
452 views

crontabs not firing on mac osx server under a non root account

I'd like to run a crontab but it is never fired. It's on a mac osx server 10.5.6 Accounts on mac are not defined in /etc/passwd. So their is no use in adding my account in /usr/lib/cron/cron.allow. I ...
kaklon's user avatar
  • 177
0 votes
1 answer
5k views

launchctl won't load php-fpm with this LaunchAgent

I'm trying to start php-fpm with launchctl. Running directly from the command line is no problem: $ /usr/sbin/php-fpm -p /Users/dmitry -e Here's the contents of /Users/dmitry/Library/LaunchAgents/...
Dmitry Minkovsky's user avatar
0 votes
1 answer
2k views

Is it possible to stop a service through launchd if the service is started manually?

I am using launchd to start mysql on boot, it is working fine. I am able to stop and start the service using 'launchctl unload' and 'launchctl load' commands. Also I am able to start the service by ...
karthzDIGI's user avatar
0 votes
0 answers
14 views

How can I get the launchctl.out file on daily on MacOS?

I am new with MacOS. And I am not the one who made this plist file. All I just findout somehow this plist file makes this shell script avery 60seconds. I am just familiar with CRON on linux system, ...
Jiwon's user avatar
  • 101
0 votes
1 answer
361 views

Manipulating Launchd from Python?

I have a simple python script for manipulating a plist file. Once this file is updated, I'd like to have that same script unload and then load that plist file in launchd. Normally, I'd use launchctl ...
Sigsegv's user avatar
  • 101