See all information about all processes, daemons, etc. running on Mac OS X
I like to view information about all processes (including every daemon etc etc) that are running on Mac OS X.
I use:
sudo ps -A
Update: I also tried Activity Monitor as suggested by Alex.
My questions:
Is there a better way?
How do I identify which of processes are native (shipped with the OS), belong to my installed applications (I.e. Thunderbird, Parallels Desktop etc) or cannot be classified?
How do I find out which processes sending information into the Internet or local network?
Background:
The system responds slowly and the Terminal tends to hang up after I start the Terminal application for the first time after start up. I tried to remove unused applications, run all of Maintenance.app's maintenance scripts, disabled startup items, disabled all eye candy, bought max. RAM - but still everything is slow.
Why not try using Activity Monitor? It's buit-in, has a GUI and offers plenty of information.
Here's how it looks:
If I were trying to find out why Terminal or bash were slow at starting up, I would first double-check for directories in PATH that are network-based (do you have any AFP or NFS shares mounted on your machine? Not so common on desktop Macs, but that's a 'Unix-SA-101'-taught cause.)
I would then try sourcing the script into a separately executed shell, to see if they were slow then. I might also either log in remotely, via SSH, or use a second different 'term' type program, to execute 'sudo dtruss -d -f -p ' on the newly started Terminal.app process ID and see if there were any clues there as to what it was busy doing (or not doing!) If I could reproduce the problem just by starting a bash process, then I'd dtruss that directly.
Assuming you're running some variant of Leopard, this script will dump out a big long list of all the aftermarket system augmentations it can find on your system:
http://www.khiltd.com/Downloads/ConsultantsCanary.tar.gz
And this one will dump out a big long list of all the processes with open network connections (very, very slowly):
http://www.khiltd.com/Downloads/lwt.sh
The first one is a double-clickable AppleScript wrapper, the second must be run from the command line and may spew a few errors as well under 10.6. Neither actually does anything beyond reporting the files' existence, so if you want something removed you have to do it yourself.