The attached pasLeakMonitor.p works by reading pasoe instance definitions from the attached instances.txt, enabling PASOE's Memory Leak Detection feature, which keeps track of memory leaks in memory, then waiting a specified interval (5 minutes by default) and fetching the leaks and formatting them in a summary report named with the pattern: [LeakReport_<agentpid>_<date>_<time>.txt] (example: LeakReport_16236_4_06262025_154517.txt).
The instances.txt file is space separated and is formatted as follows:
<hostname> <instancename> <http_port> <https_port> <admin_user> <admin_password> <use_https_logical>
You can monitor as many pasoe instances as you like with this program, and can change the number of minutes to record information by changing the value of the iInterval variable. The iInterval value is measured in milliseconds.
Below is an example of generated output.
Type: DATASET Source: RunleakCode.p at 35 Count: 11 Size: 0
Type: DATASET Source: RunleakCode.p at 36 Count: 11 Size: 0
Type: MEMPTR Source: RunleakCode.p at 47 Count: 11 Size: 5899553
Type: MEMPTR Source: RunleakCode.p at 48 Count: 11 Size: 135795
Type: MEMPTR Source: RunleakCode.p at 52 Count: 55 Size: 56320
This utility is provided as an example only and should be modified by the user as necessary. Note that the instances.txt file is intended to hold the tomcat password for the instance, so you probably want to protect this file or find another way to provide the password.