The four services with wrapper.log files we can control are:
Each writes to its own unique wrapper.log file that can be found in the location:
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:
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.
# 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.
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
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.
Another possible values that helps while still limiting file size growth per the wrapper.logfile.maxsize property value:
- 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.
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.
- SIZE: In this mode, the log file will be rolled whenever its size exceeds the value defined by the wrapper.logfile.maxsize property.
- 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.
We recommend setting wrapper.logfile.maxfiles value to a maximum of 5 to keep 5 rotated logs available for review if needed.
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.
The full commands for each service stop in the correct order would be:
- Stop the services with "service <serviceName> stop"
- Start the services with "service <serviceName> start"
- service caperfcenter_console stop
- service caperfcenter_devicemanager stop
- service caperfcenter_eventmanager stop
- service caperfcenter_sso stop
The full commands for each service start would be:
If editing just one wrapper.conf for one service, stop and restart only that service as needed.
- service caperfcenter_console start
- service caperfcenter_devicemanager start
- service caperfcenter_eventmanager start
- service caperfcenter_sso start
If editing wrapper.conf files for all four services at once, make sure to stop and restart the four services in the proper order.