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 : Common OEJMX queries
 
Common OEJMX queries
This topic highlights commonly used queries and what information they provide about your application.

Get active session information

When to use: To identify active sessions in order to gather further information about those sessions.
Query:
{"O":"PASOE:type=OEManager,name=SessionManager","M":["getMetrics","oepas1"]}
Note: In this example, the token APP_NAME is replaced with oepas1.
Result:
The output provides details about client connections including avgQueueDepth, maxConcurrentClients, maxQueueDepth, reads, requests and timesQueued. The maxQueueDepth can be used to determine if there are any bottlenecks causing the requests to be queued which could indicated areas to improve performance by reducing the queuing of requests.
{ "getMetrics": { "accessTime": "2018-06-25T15:43:12.766-04:00", "avgQueueDepth": "0",
"concurrentConnectedClients":"0", "maxConcurrentClients": "50", "maxQueueDepth": "0", "readErrors": "0",
"reads": "30133", "requests": "15059", "reserveConnectionTimeouts": "0", "startTime": "2018-06-25T15:20:33.981-04:00",
"timesQueued": "0", "type": "OE_BROKER", "writeErrors": "0", "writes": "30132" } }

Get a stack trace for a session

When to use: By supplying a specific AGENT_ID and SESSION_ID, the query can return a stack trace for the session.
Query:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getSessionStacks","16952","7"]}
Note: In this example, the token AGENT_ID is replaced with 16952 and SESSION_ID is replaced with 7.
Result:
The output displays a list of the stack trace listing files that were in use by the session. Used in conjunction with the GetSessionMetrics to identify active sessions like SessionID=7, developers can target specific files for the ACTIVE session to investigate.
{
"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": ""
}
]
}}

Get metrics for a specific ABL application

When to use: SessionManager metrics provide information about the number of requests that were executed/failed/queued while running on a specific ABL Application.
Query:
{"O":"PASOE:type=OEManager,name=SessionManager","M":["getMetrics","oepas1"]
Note: In this example, the token SESSION_ID is replaced with 7.
Result:
The output demonstrates the number of requests and in this example the maxQueueDepth and avgQueueDepth are both 0, which indicates that no clients were ever queued. This indicates that the server is running well.
{
"getMetrics": {
"accessTime": "2018-06-25T15:43:12.766-04:00",
"avgQueueDepth": "0",
"concurrentConnectedClients":"0",
"maxConcurrentClients": "50",
"maxQueueDepth": "0",
"readErrors": "0",
"reads": "30133",
"requests": "15059",
"reserveConnectionTimeouts": "0",
"startTime": "2018-06-25T15:20:33.981-04:00",
"timesQueued": "0",
"type": "OE_BROKER",
"writeErrors": "0",
"writes": "30132"
}
}

Get hung client connections for a specific ABL application

When to use:HungClient Connections provides information about the number of requests that are still running in a given ABL Application to identify clients connections that are hung.
Query:
{"O":"PASOE:type=OEManager,name=SessionManager","M":["getHungClientConnections","oepas1",6000]}
Note: In this example, the token APP_NAME is replaced with oepas1.
Result:
The elapsedTimeMs can be used to help identify long running requests which could indicated a hung client connection.
{
"getHungClientConnections":[
{
"httpSessionId":"",
"reqStartTimeStr":"2018-06-25T15:32:48.139-0400",
"clientName":"172.16.21.106",
"executerThreadId":"thd-5",
"requestID":"3fj1RO35XYk/FDkZSN5UUw",
"requestProcedure":"retrieveAccnts.p",
"requestUrl":"http://localhost:29402/apsv",
"sessionID":"C4F5EA614E9B1F8D94E28D7A87185DA923C4EE22F204.oepas1",
"adapterType":"APSV",
"elapsedTimeMs":35298
},
{
"httpSessionId":"",
"reqStartTimeStr":"2018-06-25T15:32:47.667-0400",
"clientName":"localhost",
"executerThreadId":"thd-1",
"requestID":"rw4IDagih4Q/FDkZAMm8TQ",
"requestProcedure":"mycustomer.p",
"requestUrl":"http://localhost:29402/apsv",
"sessionID":"9E0DDCB1CF61036B5D52587FA41CDEAAE9C8D8713B59.oepas1",
"adapterType":"APSV",
"elapsedTimeMs":35771
},
{
"httpSessionId":"",
"reqStartTimeStr":"2018-06-25T15:33:11.131-0400",
"clientName":"localhost",
"executerThreadId":"thd-1",
"requestID":"gBR4KKyWS6E/FDoZuBeYZQ",
"requestProcedure":"getlist.p",
"requestUrl":"http://localhost:29402/apsv",
"sessionID":"13512413B5FE9737F0180B7439EF7921EA0CDBA52753.oepas1",
"adapterType":"APSV",
"elapsedTimeMs":12307
}
]
}

Get information about active session on a given agent

When to use:
To get agent session metrics including state of the session, memory consumed, session-Id and time started among others.
Query:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getAgentMetrics","16952"]}
Note: In this example, the token AGENT_ID is replaced with 16952.
Result:
Returns session metrics associated with the agent.
{
"getAgentMetrics": {
"AgentStatHist": [{
"ActiveThreads": 1,
"OpenConnections": 1,
"ExitedSessions": 0,
"ExitedThreads": 0,
"CStackMemory": 2097152,
"ClosedConnections": 0,
"OverheadMemory": -7015299910500,
"ActiveSessions": 2
}]
}
}

Get agent session metrics

When to use:
Agent Session Metrics provides state of the session, memory consumed, session-Id, time it was started for each agent session.
Query:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getSessionMetrics","16952"]}
Note: In this example, the token AGENT_ID is replaced with 16952.
Result:
The output demonstrates information for all sessions (4 & 7). Information includes SessionState, ConnectionId, SessionMemory, EndTime, ThreadId, SessionExternalState, StartTime and SesssionId.
{
"getSessionMetrics": {
"AgentSession": [{
"SessionState": "IDLE",
"ConnectionId": "org.codehaus.jettison.json.JSONObject$Null",
"SessionMemory": -2341561411224,
"EndTime": "org.codehaus.jettison.json.JSONObject$Null",
"ThreadId": -1,
"SessionExternalState": 0,
"StartTime": "2018-07-11T13:33:45.491",
"SessionId": 4
}, {
"SessionState": "IDLE",
"ConnectionId": "org.codehaus.jettison.json.JSONObject$Null",
"SessionMemory": -7916428289816,
"EndTime": "org.codehaus.jettison.json.JSONObject$Null",
"ThreadId": -1,
"SessionExternalState": 0,
"StartTime": "2018-07-11T13:33:45.491",
"SessionId": 7
}]
}
}

Get Active threads from Tomcat thread pool

When to use:
Gets information about the active threads for a given Tomcat thread pool
Query:
# Tokens: APP_NAME, AGENT_ID, AGENT_PID, SESSION_ID
# Get Active threads from Tomcat thread Pool
{"O":"Catalina:type=Executor,name=tomcatThreadPool","A":"activeCount"}
Note: For more information about using tokens, see OEJMX utility.
Result:
Returns 10 as activeCount.
{"activeCount":10}

Get APSV Transport metrics for the given ABLApp and WebApp

When to use:
Gets the metrics for the requests that were executed on the APSV transport. It gives the count on number of requests that were connected/disconnected, failing and many more.
Query:
# Tokens: APP_NAME, AGENT_ID, AGENT_PID, SESSION_ID
# Get APSV Transport metrics for the given ABLApp and WebApp
{"O":"PASOE:type=OEManager,name=ApsvTransportManager","M":["getMetrics","oepas1","ROOT"]}
Note: For more information about using tokens, seeOEJMX utility.
Result:
Returns the APSV Transport Metrics for a given OEABL WebApp.
{
"getMetrics": {
"disconnectRequests": "15",
"connectErrors": "0",
"disconnectErrors": "0",
"sessionErrors": "0",
"startTime": "2018-07-11T08:17:35.329-04:00",
"sessionRequests": "39",
"forbiddenErrors": "0",
"type": "OE_APSV_TRANSPORT",
"connectRequests": "15",
"accessTime": "2018-07-11T13:11:48.554-04:00",
"statusRequests": "0"
}
}