Options for controlling em.log

Document ID : KB000111800
Last Modified Date : 21/08/2018
Show Technical Document Details
The em.log can grow uncontrolled as it redirected stdout when the Enterprise Manager is started using the EMCtrl.sh which is the default option for UNIX systems.

This article aims to suggest some ways that the log can be controlled, either by finding ways to control it or stopping it completely.
The important parts controlling where the file originates as contained within EMCtrl.sh
  • The variable specifying the location:
  • The command to start the Enterprise Manager where the output is redirected to the location specified by the LOGFILE variable
nohup "$EMCmd" >> $LOGFILE 2>&1 &

Options to reduce the size:
  • The startup command can be changed so that the output is overwritten after every Enterprise Manager restart.
To do this, change the line from
nohup "$EMCmd" >> $LOGFILE 2>&1 &

nohup "$EMCmd" > $LOGFILE 2>&1 &
  • Remove console from log4j logging options
In IntroscopeEnterpriseManager.properties, the majority of logging options log to both console and logfile. If you remove the console option, for example:



you will greatly reduce the amount of data written in em.log, all data which is duplicated in IntroscopeEnterpriseManager.log.

Look for all log4j.logger options in introscopeEnterpriseManager.properties that write to both console and logfile as there are several.

Options to stop the file
  • Modify the $LOGFILE variable so that the information is written to /dev/null
Either edit the variable:

or modify the startup command in this way:

nohup "$EMCmd" /dev/null 2>&1 &