Wednesday, July 9, 2008

How to check what is running on your system

Ok if you have ever looked over the shoulder of a linux person goign to town you may have seen something like
ps -aux | grep cron

so here is what is really going on in that command
ps

The ps command tells you what processes are actually running. In the manual it actual says that it gives you a snapshop of what is running on the system.
-aux

says print all processes owned by a user named "x" this could be changed to specify a specific user
|

The "|" or pipe symbol says to this command and this other command together
grep

"grep" is a filter. If you were to simply type "ps" you woudl get a screen full of processes running for your user. By adding the "|" along with "grep" you can filter those processes down to what you need. In this case we looked for "cron" jobs (scheduled tasks). That can of course be changed to anything else you may need to check on.

So to say it all together the command
ps -aux | grep cron
is actually telling the computer to show all processes under any user that specifically deals with cron.


Hope that helps!!

1 comment:

Robert said...

It's really nice and meanful. it's really cool blog. Linking is very useful thing.you have really helped lots of people who visit blog and provide them usefull information. 300W AC/DC Switching Adapter