OS X: Unload process from launchctl

0

I need to stop collectd for a while. I can see it's running:

ps axuw | grep collectd
user    73543   0.0  0.0  2540860   1900   ??  S     4:15PM   0:00.26 /usr/local/Cellar/collectd/5.4.0/sbin/collectd -f -C /usr/local/etc/collectd.conf

kill [PID] kills the process but it starts again.

I can see it in launchctl list:

launchctl list | grep collectd
73543   -   homebrew.mxcl.collectd

But I cannot find its plist:

mac:~ user$ ls /System/Library/LaunchDaemons/ | grep -i "collectd"
mac:~ user$
mac:~ user$ ls /Library/LaunchDaemons/ | grep -i "collectd"
mac:~ user$

So I have no idea how to unload it. Thanks.

hdf

Posted 2014-09-23T00:02:07.423

Reputation: 115

what happens if you use launchctl stop instead of kill? – lzam – 2014-09-23T00:14:59.430

@lzam:

`mac:~ user$ launchctl stop 73543`

 `launchctl stop error: No such process`
 – hdf  – 2014-09-23T00:19:35.033

I don't think you can call launchctl stop with a PID you need the label. you can try to find it with launchctl list. Note that you may need to use sudo for both commands. – lzam – 2014-09-23T02:01:38.233

Answers

0

Just found the plist in

~/Library/LaunchAgents

hdf

Posted 2014-09-23T00:02:07.423

Reputation: 115