Try OpenEdge Now
skip to main content
New Information
Progress Application Server for OpenEdge : Manage and monitor an instance : Use OEJMX to manage and monitor an instance : Generate a stack trace
 
Generate a stack trace
OEJMX provides access to the stack information for a session by querying the AgentManager to find active sessions and then querying those sessions to generate a stack trace.
1. Write a query to getSessionMetrics.
Example:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getSessionMetrics","16952"]}
Note: The query uses a specific AgentID, 16952 to return session metrics for a specific session.
2. Save the query as getSessionMetrics.qry.
3. Run the query using oejmx -Q /path/getSessionMetrics.qry.
4. Review the output in instance/temp/getSessionMetrics-out-yyMMdd-HHmm.
Notice that Session-7 is in ACTIVE state and still running some ABL code.
{
"getSessionMetrics": {
"AgentSession": [{ "SessionState": "IDLE", "ConnectionId": "org.codehaus.jettison.json.JSONObject$Null", "SessionMemory": 630630,
"EndTime": "org.codehaus.jettison.json.JSONObject$Null", "ThreadId": -1, "SessionExternalState": 0,
"StartTime": "2018-07-30T15:18:28.736", "SessionId": 4 },{ "SessionState": "ACTIVE", "ConnectionId": 20,
"SessionMemory": 1646192, "EndTime": "org.codehaus.jettison.json.JSONObject$Null", "ThreadId": 6, "SessionExternalState": 0,
"StartTime": "2018-07-30T15:18:28.736", "SessionId": 7 }
]
}
}
5. Gather more information about "SessionId":7, run the following getSessionStacks query to get information about individual sessions and identify the running code.
This collect the getSessionStacks details.
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getSessionStacks",
"16952","7"]}
6. Save the query as getSessionStacks.qry.
7. Run the query using the query oejmx -Q /path/getSessionStacks.qry.
8. Review the output ininstance/temp/getSessionStack-out-yyMMdd-HHmm.
The output displays a list of the stack trace listing files that were in use by the session.
{
"getSessionStacks": {
"ABLStacks": [{
"Status": "Executing",
"Databases": "",
"BrokerSessionId": "A8A564D83461D3718EFA71A19C055C0D793DA292F6DF.oepas",
"Callstack": [{ "Line": 50, "Routine": "GetLogistics.p", "Source": "GetLogistics.p" }
,{ "Line": 3, "Routine": "BalanceReport.p", "Source": "BalanceReport.p" }
],
"StartupParams": "-pf /usr/Progress/dlc/startup.pf,(end .pf),-logginglevel 2,-logfile
/usr/Progress/wrk/oepas/logs/oepas.agent.log,-uburl AppServerDC://0.0.0.0:43420/,-logname oepas,
-logentrytypes ASPlumbing,DB.Connects, -ubpropfile /usr/Progress/wrk/oepas/conf/openedge.properties,
-ASID 1,-ipver IPv4,-sectok XXXXXXXXXXXXXXXXXXXXXX,-T /usr/Progress/wrk/oepas/temp","Propath": ",
/usr/Progress/wrk/oepas/webapps/ROOT/WEB-INF/openedge,/usr/Progress/wrk/oepas/openedge,
/usr/Progress/dlc/tty,/usr/Progress/dlc/tty/adecomm.pl,/usr/Progress/dlc/tty/adeedit.pl,
/usr/Progress/dlc/tty/adecomp.pl,/usr/Progress/dlc/tty/adeshar.pl,/usr/Progress/dlc/tty/prodict.pl,
/usr/Progress/dlc/tty/OpenEdge.Core.pl,/usr/Progress/dlc/tty/OpenEdge.ServerAdmin.pl,
/usr/Progress/dlc/tty/dataadmin.pl,/usr/Progress/dlc/tty/ablunit.pl,
/usr/Progress/dlc/tty/OpenEdge.BusinessLogic.pl,
/usr/Progress/dlc/tty/OpenEdge.KendoUIBuilder.pl,
/usr/Progress/dlc/tty/netlib/OpenEdge.Net.pl,/usr/Progress/dlc,/usr/Progress/dlc/bin",
"AgentSessionId": 7,
"OO4GLObjs": [{ "ObjectId": "001026", "Class": "OpenEdge/Testing/GetInfo.cls" }
,{ "ObjectId": "STATIC", "Class": "OpenEdge/Testing/APIClass.cls" }
,{ "ObjectId": "STATIC", "Class": "OpenEdge/Testing/GetInfo.cls" }
,{ "ObjectId": "001000", "Class": "OpenEdge/Rest/Admin/AppServerStatus.r" }
],"PersProcs": ""
}
]
}
}
From more information see the Common OEJMX queries .