b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Technology Channel Subscribe to this Feed

New Linux User

HOWTO : Monitor Processes Using the PS Command

by Jon on May 2nd, 2006

The ps command will display the running processes on a GNU/Linux system. As with many command-line applications, there are many options and switches. I’m just going to touch on the few more common but you can use the man ps command to find out other things you can do with ps.

ps by itself will display a short list of processes owned by you and attached to a terminal.

ps -a will display a list of processes owned by all users, but still attached to a terminal

ps -u will display a list of processes owned by you, attached to a terminal, and the user name (useless by itself since ps only displays your own processes to begin with)

ps -x
will display processes that are not attached to a terminal (like all your daemons and servers).

The most common command I use, then, is all three of these put together like so:

ps -aux (hyphen not required in this instance)

This will display all processes running on my system regardless of which user they belong to, or whether they are attached to a terminal. This can be quite a long list, so I might also pipe the output to grep and look for things like specfic text:

ps -aux | grep httpd

This will show me all the processes on my terminal that contain the phrase httpd in them. This can also be achieved by using the command:

ps -C httpd

Enjoy!

Related: pstree command | top command

Technorati Tags: , ,

POSTED IN: How To

1 opinion for HOWTO : Monitor Processes Using the PS Command

Have an opinion? Leave a comment:




Check Spelling
Activate Spell Check while Typing