Generate a stack trace
Print
- Last Updated: August 18, 2021
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
-
Write a query to
getSessionMetrics.Example:{"O":"PASOE:type=OEManager,name=AgentManager","M":["getSessionMetrics"," 16952"]}Note: The query uses a specific AgentID,16952to return session metrics for a specific session. -
Save the query as
getSessionMetrics.qry. -
Run the query using
oejmx -Q /path/ getSessionMetrics.qry. -
Review the output in
instance-name/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 } ] } } -
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"]} -
Save the query as
getSessionStacks.qry. -
Run the query using the query
oejmx -Q /path/ getSessionStacks.qry. -
Review the output in
instance-name/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": "" } ] } }