Controlling wrapper.log file size and rotation in CA Performance Manager installations
search cancel

Controlling wrapper.log file size and rotation in CA Performance Manager installations

book

Article ID: 32449

calendar_today

Updated On:

Products

CA Infrastructure Management CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

The wrapper.log file(s) in CA Performance Manager (CAPM) can potentially grow to a size that is going to impact the systems functionality. This could potentially cause a down system situation due to a full disk if left unchecked and not managed in some way.

The following instructions provide configuration details to customize the size the logs can grow to before they are rotated, as well as how many logs are stored before old ones are deleted to make space for new ones.



Each of the four CA Performance Manager (CAPM) services have a wrapper.log file that contains a great deal of logging information. These are critical to the proper operation of CAPM as well as for use in trouble shooting problems with the system or its services.

Controlling these files is critical to optimal server operations and health.

Environment

All supported CA Performance Management releases

Resolution

The four services with wrapper.log files we can control are:



  • caperfcenter_console
  • caperfcenter_devicemanager
  • caperfcenter_eventmanager
  • caperfcenter_sso


Each writes to its own unique wrapper.log file that can be found in the location:



$CAPM_HOME/CA/PerformanceCenter/<service>/logs



Assuming a default install path of /opt is in use, the four directories that store the wrapper.log are:



  • /opt/CA/PerformanceCenter/PC/logs (represents the caperfcenter_console service)
  • /opt/CA/PerformanceCenter/DM/logs (represents the caperfcenter_devicemanager service)
  • /opt/CA/PerformanceCenter/EM/logs (represents the caperfcenter_eventmanager service)
  • /opt/CA/PerformanceCenter/sso/logs (represents the caperfcenter_sso service)


The wrapper.log file size and rotation (count of logs stored) for each service is defined in the wrapper.conf file present for each service. This file is found in:



$CAPM_HOME/CA/PerformanceCenter/<service>/conf



Assuming a default install path of /opt is in use, the four directories that store the wrapper.conf are:



  • /opt/CA/PerformanceCenter/PC/conf(represents the caperfcenter_console service)
  • /opt/CA/PerformanceCenter/DM/conf (represents the caperfcenter_devicemanager service)
  • /opt/CA/PerformanceCenter/EM/conf (represents the caperfcenter_eventmanager service)
  • /opt/CA/PerformanceCenter/sso/conf (represents the caperfcenter_sso service)


Within the wrapper.conf file we are able to edit to configuration properties found in the section titled:



#********************************************************************
# Wrapper Logging Properties
#********************************************************************



Within that section these are the properties that control file size, file rotation and the mode of rotation:



# Log file to use for wrapper output logging.

wrapper.logfile.rollmode=DATE

# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.

wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.

wrapper.logfile.maxfiles=0



 



Rollmode Recommendations




The following are the possible values for the wrapper.logfile.rollmode property. This was added in the r2.7 release and we default to the value DATE.



  • DATE: In this mode, As each log entry is logged to a file by date, its timestamp is compared with a "YYYYMMDD" formatted token in the current log file. Whenever this date changes a new log file will be start to be logged. This has the benefit of grouping all log entries for a given day in a specific file. A file will not be created on days which do not have any log output.

Another possible values that helps while still limiting file size growth per the wrapper.logfile.maxsize property value:

  • SIZE: In this mode, the log file will be rolled whenever its size exceeds the value defined by the wrapper.logfile.maxsize property.

Other values are available to set. They all allow the wrapper log file to grow without limit. These should be used in very limited cases, generally only when debugging efforts are underway.

  • NONE: In this mode, the log file will never be rolled by the Wrapper. The log file will continue to grow in size indefinitely. In general, it is best to avoid this option as it could provide a way for the Wrapper to eat up all available disc space should an application produce very large quantities of output.
  • WRAPPER: In this mode, the log file will be rolled when the Wrapper is first launched. This rolling will happen immediately after the configuration file has been loaded. For this reason, any configuration problems will be logged to the file prior to it being rolled. In this WRAPPER mode, the log files will not have a maximum size and will continue to grow until the Wrapper is restarted.
  • JVM: In this mode, the log file will be rolled on Wrapper startup as with the WRAPPER mode. But it will also be rolled just before any restarted JVMs are launched. In this JVM mode, the log files will not have a maximum size and will continue to grow until the Wrapper or a JVM is restarted.
  • SIZE_OR_WRAPPER: This mode combines the SIZE and WRAPPER modes. The log file will be rolled on Wrapper startup or whenever the log file exceeds the configured maximum size.
  • SIZE_OR_JVM: This mode combines the SIZE and JVM modes. The log file will be rolled on Wrapper startup, JVM restart, or whenever the log file exceeds the configured maximum size.

 

Maxfiles Recommendations




We recommend setting wrapper.logfile.maxfiles value to a maximum of 5 to keep 5 rotated logs available for review if needed.
 



 



Maxsize Recommendations




The wrapper.logfile.maxsize setting is something determined by the end user. If we're keeping the recommended 5 logs, keep in mind that setting will be multiplied by 5. If you set it to 10 megabytes, and 5 files, you will have five 10 megabyte files present. Determine the size of the files in relation to available disk space to ensure they aren't set to keep so much logging that the disk becomes full.
 



Changing Property Values




Make the changes desired to the necessary wrapper.log file(s) via the wrapper.conf for the related service and save the changes.

Ensure ONLY those settings are changed. If other settings are mistakenly edited, the service may not continue to function as designed.



After saving the changes to the wrapper.conf file, the related service will need to be restarted to read the wrapper.conf changes into memory. To restart the services run these commands as the root or sudo root user that owns the installation.



  1. Stop the services with "service <serviceName> stop"
  2. Start the services with "service <serviceName> start"

The full commands for each service stop in the correct order would be:

  1. service caperfcenter_console stop
  2. service caperfcenter_devicemanager stop
  3. service caperfcenter_eventmanager stop
  4. service caperfcenter_sso stop


The full commands for each service start would be:



  1. service caperfcenter_console start
  2. service caperfcenter_devicemanager start
  3. service caperfcenter_eventmanager start
  4. service caperfcenter_sso start

If editing just one wrapper.conf for one service, stop and restart only that service as needed.

If editing wrapper.conf files for all four services at once, make sure to stop and restart the four services in the proper order.

Additional Information

NOTE: It is recommended that no other properties be modified without the direction of CA Support.

Additional Note: As of the r2.7 release the default configuration for the wrapper.logfile.maxfiles is set to 5. To configure the log rollup strategy the same as the r2.7 release set that value to 5.