Apama 10.15.5 | Deploying and Managing Apama Applications | Correlator Utilities Reference | Shutting down and managing components | Viewing garbage collection and application events information
 
Viewing garbage collection and application events information
The information in this topic applies to the correlator only.
You can enable logging of verbose garbage collection and application events in different ways and at different times, as described below.
Using the engine_management tool to enable garbage collection and application event logging for a running correlator
A handy way to view garbage collection (GC) information for a running correlator is to execute the following command:
engine_management -r verbosegc on
This command enables logging of garbage collection events, and is particularly useful in production environments. The additional garbage collection information goes to the correlator log, where the garbage collection messages are logged at DEBUG level and are signposted by a prefix, <apama.verboseGC.MonitorName>, where MonitorName indicates the monitor where garbage collection occurred.
To disable logging of garbage collection information, execute the following command:
engine_management -r verbosegc off
The above commands provide an alternative to the following command, which provides a great deal of detailed output (such as context-state changes, event triggering, spawning, routing, etc.) in addition to garbage collection information:
engine_management -r applicationEventLogging on
Again, this output goes to the correlator log, with the messages being logged at DEBUG level. Any additional log messages to the garbage collection messages are signposted by the prefix <apama.applicationEvents>.
To turn this off, execute the following command:
engine_management -r applicationEventLogging off
See Shutting down and managing components for more information on the -r (or --dorequest) option of the engine_management tool.
Enabling garbage collection and application event logging at correlator startup
You can also enable garbage collection logging at correlator startup. To do so, execute the following command:
correlator --loglevel apama.verboseGC=DEBUG
This enables verbose garbage collection logging for all monitors.
If you only wish to enable garbage collection logging for a particular monitor, append the name of the monitor (for example, MyMonitor) to apama.verboseGC as follows:
correlator --loglevel apama.verboseGC.MyMonitor=DEBUG
This enables verbose garbage collection logging only for the monitor which has the name MyMonitor.
Similarly, you can also enable application event logging at start time by starting a correlator with the following command:
correlator --loglevel apama.applicationEvents=DEBUG
Note: 
If you enable application event logging at start time in this fashion, this will not enable verbose garbage collection logging (as is the case when enabling it using the engine_management request). Furthermore, it is not possible to enable application event logging on a per-monitor basis, as it is for garbage collection logging.
See Starting the correlator for more information on the --loglevel (or -v) option of the correlator command.
Using a YAML configuration file to enable garbage collection and application event logging at correlator startup
Another way to enable garbage collection logging or application event logging at start time is through a YAML configuration file. For more information, see the descriptions of the following categories in Setting correlator and plug-in log files and log levels in a YAML configuration file:
*apama.verboseGC
*apama.verboseGC.MonitorName
*apama.applicationEvents