Difference between revisions of "Command Line and environment variables FAQ"

(Environment Variables)
 
(One intermediate revision by one user not shown)
Line 3: Line 3:
 
=== Logging ===
 
=== Logging ===
  
* CPM_LOG_FILE_SIZE
+
* '''CPM_LOG_FILE_SIZE'''
 
This variable defines the maximum size of the stdout (console) log.  Use a number + K for kilobytes, M for megabytes and G for gigabytes.
 
This variable defines the maximum size of the stdout (console) log.  Use a number + K for kilobytes, M for megabytes and G for gigabytes.
  
Line 11: Line 11:
 
</pre>
 
</pre>
  
* CPM_LOG_FILE_ROTATIONS
+
* '''CPM_LOG_FILE_ROTATIONS'''
 
This variable defines the number of log files (i.e) name1.log name2.log, etc to use before restarting the count.
 
This variable defines the number of log files (i.e) name1.log name2.log, etc to use before restarting the count.
  
Line 19: Line 19:
 
</pre>
 
</pre>
  
* ASP_STDOUT_LOGFILE (deprecates ASP_CPM_LOGFILE)  [version 5.1+]
+
* '''CL_LOG_TO_FILE'''
This variable overrides the log file name.  Use either an absolute path (beginning with /) or a path relative to the ASP log directory.
+
Sends all logs to a file or stdout.  This environment variable is very helpful when debugging problems that occur before the SAFplus log server has started.  For example:
 +
<pre>
 +
export CL_LOG_TO_FILE=stdout
 +
export CL_LOG_TO_FILE=/var/log/mylog.txt
 +
</pre>
 +
 
 +
* '''ASP_STDOUT_LOGFILE''' (deprecates ASP_CPM_LOGFILE)  [version 5.1+]
 +
This variable overrides the log file name for the safplus_amf.  Use either an absolute path (beginning with /) or a path relative to the ASP log directory.
 
The special name "console" will output to the console instead of a file.<br/>
 
The special name "console" will output to the console instead of a file.<br/>
 
Note, setting this variable to "console" is equivalent starting with the command "etc/init.d/asp consolestart".
 
Note, setting this variable to "console" is equivalent starting with the command "etc/init.d/asp consolestart".
Line 31: Line 38:
 
</pre>
 
</pre>
  
* CL_LOG_CODE_LOCATION_ENABLE
+
* '''CL_LOG_CODE_LOCATION_ENABLE'''
  
 
Adds file/line to each log message, so logs can be tracked in the source code
 
Adds file/line to each log message, so logs can be tracked in the source code
Line 40: Line 47:
 
</pre>
 
</pre>
  
* CL_LOG_TIME_ENABLE
+
* '''CL_LOG_TIME_ENABLE'''
  
 
Adds a timestamp to each log message (default is true)
 
Adds a timestamp to each log message (default is true)
Line 48: Line 55:
 
export CL_LOG_TIME_ENABLE=0
 
export CL_LOG_TIME_ENABLE=0
 
</pre>
 
</pre>
 
  
 
=== Debugging ===
 
=== Debugging ===
  
* ASP_NODE_REBOOT_DISABLE  
+
* '''ASP_NODE_REBOOT_DISABLE'''
  
 
Disable reboot of nodes, even if the AMF HA algorithm determines a reboot is necessary.
 
Disable reboot of nodes, even if the AMF HA algorithm determines a reboot is necessary.
Line 58: Line 64:
 
  export ASP_NODE_REBOOT_DISABLE=1
 
  export ASP_NODE_REBOOT_DISABLE=1
  
* ASP_NODE_RESTART
+
* '''ASP_NODE_RESTART'''
 
   
 
   
 
Restart the SAFplus on node recovery, rather then wait for operator intervention.
 
Restart the SAFplus on node recovery, rather then wait for operator intervention.
  
 
  export ASP_NODE_RESTART=1
 
  export ASP_NODE_RESTART=1
 
* CL_LOG_TO_FILE
 
 
Sends all logs to a file or stdout.  This environment variable is very helpful when debugging problems that occur before the SAFplus log server has started.  For example:
 
export CL_LOG_TO_FILE=stdout
 
export CL_LOG_TO_FILE=/var/log/mylog.txt
 

Latest revision as of 21:21, 25 August 2016

[edit] Environment Variables

[edit] Logging

  • CPM_LOG_FILE_SIZE

This variable defines the maximum size of the stdout (console) log. Use a number + K for kilobytes, M for megabytes and G for gigabytes.

Example:

export CPM_LOG_FILE_SIZE=100K
  • CPM_LOG_FILE_ROTATIONS

This variable defines the number of log files (i.e) name1.log name2.log, etc to use before restarting the count.

Example:

export CPM_LOG_FILE_ROTATIONS=100
  • CL_LOG_TO_FILE

Sends all logs to a file or stdout. This environment variable is very helpful when debugging problems that occur before the SAFplus log server has started. For example:

 export CL_LOG_TO_FILE=stdout
 export CL_LOG_TO_FILE=/var/log/mylog.txt
  • ASP_STDOUT_LOGFILE (deprecates ASP_CPM_LOGFILE) [version 5.1+]

This variable overrides the log file name for the safplus_amf. Use either an absolute path (beginning with /) or a path relative to the ASP log directory. The special name "console" will output to the console instead of a file.
Note, setting this variable to "console" is equivalent starting with the command "etc/init.d/asp consolestart".

Example:

export ASP_STDOUT_LOGFILE=/tmp/stdoutlog.txt
export ASP_STDOUT_LOGFILE=stdoutlog.txt
export ASP_STDOUT_LOGFILE=console
  • CL_LOG_CODE_LOCATION_ENABLE

Adds file/line to each log message, so logs can be tracked in the source code

Example:

export CL_LOG_CODE_LOCATION_ENABLE=1
  • CL_LOG_TIME_ENABLE

Adds a timestamp to each log message (default is true)

Example:

export CL_LOG_TIME_ENABLE=0

[edit] Debugging

  • ASP_NODE_REBOOT_DISABLE

Disable reboot of nodes, even if the AMF HA algorithm determines a reboot is necessary.

export ASP_NODE_REBOOT_DISABLE=1
  • ASP_NODE_RESTART

Restart the SAFplus on node recovery, rather then wait for operator intervention.

export ASP_NODE_RESTART=1