onstat -g env command: Print environment variable values
Use the onstat -g env command to display the values of the environment variables that the database server currently uses.
Invocation | Explanation |
---|---|
onstat -g env | Displays the settings of environment variables
when the database server was started Does not display environment variables that have not been set explicitly. |
onstat -g env all | Displays the settings used by all sessions This display is the same as the output of onstat -g env and onstat -g envsessionid iteratively on all current sessions. |
onstat -g env variable | Displays the default value of the specified environment
variable This variable argument eliminates the need to pipe the output to grep (or some other utility) to locate an environment variable among many that might be set. |
onstat -g env sessionid | Displays the settings that a specific session uses.
This display includes the following values:
|
onstat -g env sessionid variable | Displays the value of the specified environment
variable that the specified session uses The sessionid and variable arguments eliminate the need to pipe the output to grep (or some other utility) to locate an environment variable among many that might be set. |
The onstat -g env command displays
the current setting of an environment variable and the complete list
of values each time the variable was set in the environment. For example,
if PDQPRIORITY is set to 10
in the .informix.rc file
and set to 55
in the shell environment, onstat
-g env command displays both values.
However, if you change the PDQPRIORITY with the onmode -q pdqpriority sessionid command, the onstat -g env command does not display the new value for the session. The onstat -g env command displays only the values of environment variables set in the environment. It does not display values modified while the session is running.
- The database server instance has been up for months, and you cannot remember the setting of an environment variable (such as the server locale setting SERVER_LOCALE).
- You want to display the complete list of values for an environment variable to identify when an environment variable has been set in multiple places.
- Environment files on disk might have changed or been lost in the interim.
- A support engineer wants to know settings of specific environment variables.