In previous versions of the product, in order to track memory leaks in an ABL application, the DynObjects.* log entry type in conjunction with the LOG-MANAGER (-clientlog) is used to generate a potentially ungainly log file which would then have to be interpreted to find potential memory leaks in the executed ABL code.
OpenEdge 11.7.3 introduced a *NEW* REST API to track memory leaks in ABL application code used by a PAS ABL Session. In 11.7.4 further updates were provided in the API.
To use ABL Object Tracking:
GET
- Turn on ABLObjects tracking
URI
(11.7.3) http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/trackABLObjects/true
(11.7.4) HTTP Operation: PUT
http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/ABLObjects/status
Body
{ "enable":"true"}
header
Content-Type : application/vnd.progress+json
- Check ABLObject tracking status
URI
(11.7.3) http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/trackingABLObjects
(11.7.4) http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/ABLObjects/status
URI
(11.7.3) http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/getABLObjectsReport
(11.7.4) http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/ABLObjects
- Turn off ABLObjects tracking
URI
(11.7.3) http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/trackABLObjects/false
(11.7.4) HTTP Operation: PUT
http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/ABLObjects/status
Body
{ "enable":"false"}
header
Content-Type : application/vnd.progress+json
Example:
- Turn on tracking:
http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/trackABLObjects/true
{
"result": true,
"operation": "TRACKING ABL OBJECTS",
"versionStr": "v11.7.3 ( 2018-04-27 )",
"versionNo": 1,
"outcome": "SUCCESS",
"errmsg": ""
}
- Check tracking status
http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/trackingABLObjects
{
"result": true,
"operation": "TRACKING ABL OBJECTS",
"versionStr": "v11.7.3 ( 2018-04-27 )",
"versionNo": 1,
"outcome": "SUCCESS",
"errmsg": ""
}
- Get ABLObjectsReport
http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/getABLObjectsReport
(Below is sample output, not complete)
{
"result": {
"ABLOutput": {
"ABLObjects": [
{
"AgentSessionId": 4,
"Objects": []
},
{
"AgentSessionId": 7,
"Objects": [
{
"ObjType": "MEMPTR",
"HandleId": 1038,
"Size": 1024,
"Source": "RunleakCode.p",
"Line": 52
},
{
"ObjType": "MEMPTR",
"HandleId": 1037,
"Size": 1024,
"Source": "RunleakCode.p",
"Line": 52
},
- Turn off tracking
http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/trackABLObjects/false
- Check tracking status
http(s)://<hostName>:<port>/oemanager/applications/<app_name>/agents/<agentPID>/trackingABLObjects
{
"result": false,
"operation": "TRACKING ABL OBJECTS",
"versionStr": "v11.7.3 ( 2018-04-27 )",
"versionNo": 1,
"outcome": "SUCCESS",
"errmsg": ""
}
Code examples to use the ABL HttpClient libraries to interact with this API are available in the following Article: