Tuesday, April 29, 2008

Find out the environment the process is running in.

For the process 27480 for example, you can try the below to check out the environment the process is running in.


pargs -e 27480
envp[0]: PWD=/opt/oracle/product/9.2.0/dbs
envp[1]: TZ=Singapore
...
...


This is useful when used together with the following commands as well. Here you can find the full path of the process. Also the connections and sub processes that it has made.


/usr/ucb/ps -auxxw | grep 27480
lsof | grep 27480

No comments: