Options for controlling em.log
search cancel

Options for controlling em.log

book

Article ID: 111800

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction

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:
LOGFILE="${WILYHOME}/logs/em.log"
  • 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 &

 

Environment

Release:
Component: APMISP

Resolution

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 &

to
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:

log4j.logger.Manager=INFO,console,logfile

to
log4j.logger.Manager=INFO,logfile

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:
 
LOGFILE=/dev/null

or modify the startup command in this way:

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