DX Application Performance Management

 View Only
Expand all | Collapse all
  • 1.  EM.LOG

    Posted Jun 13, 2013 07:17 AM
    Hi

    how do i configure the em.log i can´t find it.

    //Thomas


  • 2.  RE: EM.LOG

    Broadcom Employee
    Posted Jun 13, 2013 12:43 PM
    <EM_HOME>/config/IntroscopeEnterpriseManager.properties


  • 3.  RE: EM.LOG

    Posted Jun 17, 2013 04:29 AM
    i have looked at the IntroscopeEnterpriseManager.properties file but i can´t find where i set the maximum size ?

    //Thomas


  • 4.  RE: EM.LOG
    Best Answer

    Posted Jun 17, 2013 03:57 PM
    Hi Thomas,

    You should see something like this in the IntroscopeEnterpriseManager.properties:

    log4j.appender.supportlogfile.MaxFileSize=10MB

    Thanks,

    KIRAN T


  • 5.  RE: EM.LOG

    Posted Jun 26, 2013 03:01 AM
    Thanks


  • 6.  RE: EM.LOG

    Broadcom Employee
    Posted Jun 26, 2013 04:32 PM
    Please make sure you mark your thread as resolved when you've found your solution.


  • 7.  Re: EM.LOG

    Posted Jan 04, 2016 05:36 PM

    Hi Kiran,

     

    We have this flag set to 20MB :

     

    log4j.appender.supportlogfile.MaxFileSize=20MB

     

    but the log hasn't rolled over  :

    $ du -h em.log

    11G     em.log

     

    This one seems to work though :

     

    log4j.appender.logfile.MaxFileSize=200MB

     

    $ du -h IntroscopeEnterpriseManager*

    50M     IntroscopeEnterpriseManager.log

    201M    IntroscopeEnterpriseManager.log.1

    201M    IntroscopeEnterpriseManager.log.2

    201M    IntroscopeEnterpriseManager.log.3

     

    Any thoughts?

     

    Regards,

    Matthew



  • 8.  Re: EM.LOG

    Broadcom Employee
    Posted Jan 04, 2016 05:54 PM

    Hi Matthew,

    • log4j.appender.supportlogfile.MaxFileSize only controls the size of the IntroscopeEnterpriseManagerSupport.log file.
    • As you found log4j.appender.logfile.MaxFileSize controls the size of the IntroscopeEnterpriseManager.log.* files
    • The em.log is just a redirection of standard out  & standard error when the EM is started with EM_HOME/bin/EMCtrl.sh. It's size is not controlled by any of the log4j properties in the EM properties file so the em.log will grow unlimited.

    Hope this helps

     

    Regards,

     

    Lynn



  • 9.  Re: EM.LOG

    Posted Jan 04, 2016 06:00 PM

    Thanks Lynn,

     

    So is there any way to control the logfile size apart from using a cron job to stop the EM, roll the logs and then restart the EM?

     

    Regards,

    Matthew



  • 10.  Re: EM.LOG

    Posted Jan 04, 2016 06:20 PM

    Matthew,

    First thing you want to check is what kind of information is being logged into em.log file and remove any unwanted logging.

    By default EM will write log messages to both em.log as well as IntroscopeEntepriseManager.log file for e.g

    log4j.logger.Manager=INFO, console, logfile

     

    you can remove this double logging by removing console from above\similar statements in IntroscopeEnterpriseManager.properties which by itself should reduce the size drastically.

    In addition if you use a startup script to run EM then you can add commands to reset the em log everytime process is restarted or run a cron job to manually accomplish it, however making above changes should reduce the need for same.


    Regards,

    Kulbir.



  • 11.  Re: EM.LOG

    Broadcom Employee
    Posted Jan 04, 2016 06:28 PM

    Thanks Kulbir

    Yes the default EM_HOME/bin/EMCtrl.sh appends to the existing em.log for the start command i.e.

    ===

    LOGFILE="${WILYHOME}/logs/em.log"

    ...

    nohup "$EMCmd" >> "$LOGFILE" 2>&1 &

    ===

    So Matthew you can change the >> to > if you want overwrite the em.log on each start command.

    Also you can change the stop command to backup the em.log if you want to keep backups when the EM is stopped. Alternatively something like "logrotate" could be used



  • 12.  Re: EM.LOG

    Posted Jan 04, 2016 07:32 PM

    Thanks guys,

    As we don't have access to cron on these boxes, what I think i'll do is

    1. Prune the items which are being logged to both.

    2. Update the EMCtrl.sh script to rotate the logs whenever it is restarted.

     

    Between the two, that should do the trick.

     

    Regards,

    Matthew