Click to See Complete Forum and Search --> : how can i check the running processes on linux


anjlee22
December 13th, 2002, 05:49 AM
hi...
i m a newbie on linux. i want to ask that how can i check the processes runing on my system at a time. or to check how many programs running on my system. tell me the command. i mean i want to look the names of processes running on my system. thanku.

PaulWendt
December 13th, 2002, 06:29 AM
You need to use the ps command. ps will give you, by default,
only the list of programs running under your account ... and you
probably want to know ALL programs running. ps comes to the
rescue, though: I frequenly use -ef to show all fields and for all
users. If you're looking for all programs of a particular name,
filter through ps's output by piping it to grep. If you want to count
the number of programs that match a particular grep filter, pipe
grep's output to wc -l. Here are some examples:

ps // show all programs running under your login
ps -ef // show all programs running on the system
ps -ef | grep apache // show all programs running that have the
// phrase 'apache'
ps -ef | grep apache | wc -l // show the count of above


The | is just a Shift+\.

--Paul