This post we will talking about one of the useful things which administrator often has to use. The topic is How To Get environment variables of running process Linux . Let’s first start with what is environment variable and then find out How To Check Environment Variables for a Running Process in different flavor of Unix system
What is environment Variable
An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer.
They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process.
environment variable as accessed as $VARIABLE
environment variable as accessed as %VARIABLE%
Many times we need to find out what environment variable were set when the process was started. One use case would be finding out environment variable for the oracle database instance started from Oracle cluster ware.
You may want to know what TNS_ADMIN variable ,oracle instance process are using. If it is not set ,it will be using default location $ORACLE_HOME/network/admin. We can find the environment variable using the below command on various flavor of Unix system.You just need to use the command on pmon process -id of the database instance to get the information
How To get environment variables of running process Linux?
strings –a /proc/<pid_of_the_process>/environ
ps eww <pid>
pargs -e <pid_of_the_process>
pargs or ps eww <pid_of_the_process>
The above command will help us in troubleshooting various issues.Hope you this post on how to get environment variables of running process Linux ,Solaris and AIX
Oracle ASM Interview Questions
query to get concurrent program run details in oracle apps
Oracle interview questions : Check out this page for Top 49 Oracle Interview questions and answers : Basics , Oracle SQL to help you in interviews.Additional material is also provided
Unix command for Oracle DBA : This page has useful Unix command for Oracle DBA to help you in your day-to-day activites.Same are applicable for linux also.How to kill the process
how to copy directory in linux : Check out this post the detailed description on how to copy file/directory in linux. Examples of copy directory linux command is also given
Leave a Reply