It is strange to see the questions between "windows migrated" and "default mac" users. :) Windows migrated users usually want "somewhat tweak" the system. Default Mac users - simply "using it".
I'm using MAC much years, and never needed to use the launchctl command. If mean never, mean in normal usage, of course sometimes needed use it when installing somethings from the macports - for onetime load of startup files or so.
I'm wondering, why you need start/stop/restart services with launchctl? Asking because if you not an experienced OS X users you probably will screw the system "harmony" :). So, in this case - IMHO - better to ask the specific problem, so ask how to start/stop the specific service.
As the answer - check first System preferences. Most common services are in the "Sharing" pane" - like web-server, sshd, CD sharing and so on...
Some third party dmg files with GNU stuff comes with own preference pane too. For example, you can install precompiled MYSQL server with a preference pane, what allow you start-restart the server.
If you don't find the wanted service in prefs, be more precise. What service you need start/stop? The "launchctl" command works as needed to work, ActivityMonitor too. You ofc can use "ps axuwww" or "top" commands from the Terminal too.
Remember, your now in the UNIX world, so nearly anything can be done from the command-line, but usually thats mean really much learning.. ;)
EDIT:
try:
sudo kill -1 204
^-process number
from the terminal, or simply kill the daemon from the ActivityMonitor. The watchdog should restart it.
Have you any lighthttpd file in the /Library/LaunchDaemons/*? So, any output form the command:
ls /Library/LaunchDaemons | grep -i light
if yes, you can use the:
sudo launchctl unload /Library/LaunchDaemons/filename.plist
sudo launchctl load /Library/LaunchDaemons/filename.plist
command for stop/start.
OS X uses a process launching system called launchd which consolidates functions provided by Init scripts, crontab and more in *nix systems (see the Wikipedia article for a high level overview, and Apple’s Developer docs on launch daemons and agents for details). One of the abilities of launchd is to keep a process it launched alive, if so defined by its configuration file – in that case, the process will relaunch whenever it is terminated. Your problem with a process apparently persisting across reboots and manual termination sounds very much like a case of launchd initiated process with a keepAlive
key.
launchd configuration files are in plist format and found in
~/Library/LaunchAgents
– agents for the current user account only
/Library/LaunchAgents
and /Library/LaunchDaemons
– agents and daemons for all user accounts
/System/Library/LaunchAgents
and /System/Library/LaunchDaemons
– system level agents and daemons
and are usually named in reverse domain notation (tld.domain.process.plist
). Depending if the user account of server
is yours or not (can’t say, as you have blanked it), you should look in one of the first two locations above for a likely plist (if you have Xcode installed, you can QuickLook them easily). If found, your server
is indeed controlled by launchd. The correct procedure to stop it is to remove it from launchd’s process list through
launchctl unload <tld.domain.process>
which will unload and stop the process (note you omit the plist
suffix).
There is also a GUI for handling launchd files, Peter Borg’s Lingon (make sure to get “Lingon”, not “Lingon 3”, which is a dumbed down version safe for vanilla use), which might be more convenient than manually rooting through the file locations.
Best Answer
You need to properly uninstall AVG AntiVirus for Mac first.
See: How to uninstall AVG AntiVirus for Mac