Saturday, September 29, 2007

About the Process ID (PID)

It is really,make some time hang ,due to hang of our computer.So to kill that process which make our computer hang we must have to know the process id of that program. So i think the following commands will be very helpful for you :

1. You need to use the ‘a’ option to see the processes by all users and the ‘x’ option to show all of the processes outside of the scope of the shell.
sudo ps -ax

If you just run that command as is, the results will just scroll by. In order see and browse the results at you own pace you can pipe the list into ‘less’.

sudo ps -ax | less

Or if you want to search for a particular application process, instead of piping in ‘less’ you can pipe the results into grep.

sudo ps -ax | grep search

For example I can find the process id of Firefox by doing something like this:

sudo ps -ax | grep firefox

3399 ?? S 3:30.90 /Ap ... OS/firefox-bin -ps ...
3456 p1 S+ 0:00.00 grep firefox

To kill the process :

sudo kill processId

sudo kill 3399

and be hang free...........
अरिवंद साह

No comments: