Thursday, March 29, 2012

How to see environmental variables of a running process

You can use unix ps command to see environmental variables of a running process. For example, for oracle asm pmon process:

$ps -ef|grep pmon

oracle XXXXXX  YYYYYY   0  hh:mm:ss       pts/2  0:xx grep pmon
oracle ZZZZZZZ   VVVVVV   0   MMM DD      -    0:xx asm_pmon_+ASM2

$ps eauwww ZZZZZZZ

USER          PID %CPU %MEM   SZ  RSS    TTY STAT    STIME  TIME COMMAND
oracle   .... asm_pmon_+ASM2 _=/..../oraagent.bin MANPATH=.... SUDO_GID=... LANG=.... LOGIN=... SUDO_UID=.... ORACLE_HOME=.... LIBPATH=... LD_LIBRARY_PATH=...

No comments: