Finding runtime information on a specific process ID


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » System Level

Finding runtime information on a specific process IDLast Modified: Feb 8, 2012, 4:56 pm
If you know the process ID number (PID) of a specific process, and want to know more about it (who called it, where it's running, what files it's accessing, etc..), then you can check the proc folder.

For example, if the PID number is 1234, type:

cd /proc/1234
ls -la

which will show a lot of data.  The usual things to check are:

1) cwd which is a link pointing to the current working directory.  This is usually where the program was started from, but can be changed by the program, so cannot always be trusted.

2) exe will be a link pointing to the binary that is running.

3) status The contents of the status file will hold a human readable list of information.  The important part will usually be the Uid field, as that number is what the process is running as (roughly the same as "ps aux | grep 1234")

4) fd This directory will list all open file descriptors, which are files that the process is accessing.  This can be handy to find out what it's doing, if anything locally.
 
Related Helpfiles
How to track which process is using a certain port

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST