In the below examples, UNIX naming and pathing syntax is used. For Windows environments, use proper slash direction and path indicators and use oejmx.bat instead of oejmx.sh.Get a list of agentsQuery file looks like:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getAgents","<agent-name>"]}
Example:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getAgents","oepas1"]}
Call looks like:
<instance-dir>/bin/oejmx.sh -R -Q <input-query-path\file> -O <output-path\file>
Example:
/usr/wrk/oepas1/bin/oejmx.sh -R -Q /usr/wrk/oepas1/temp/getAgents_oepas1.qry -O /usr/wrk/oepas1/temp/getAgents_oepas1.out
Output looks like:
{"getAgents":{"agents":[{"agentId":"xloyKr55Rpagx7qFYbo9bw","pid":"12337","state":"AVAILABLE"}]}}
Use AgentId in subsequent queries. AgentId and PID are interchangeable with these queries, however pasoe will often reuse the same PID so it's not a unique identifier of an agent. AgentId is unique.
Get Stacks:To get a list of the stacks on all threads in a multi-session agent...
Query looks like:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getAgentStacks","<AgentId>"]}
Example:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getAgentStacks","xloyKr55Rpagx7qFYbo9bw"]}
Call looks like:
<instance-dir>/bin/oejmx.sh -R -Q <input-query-path\file> -O <output-path\file>
Example:
/usr/wrk/oepas1/bin/oejmx.sh -R -Q /usr/wrk/oepas1/temp/getAgentStacks_oepas1.qry -O /usr/wrk/oepas1/temp/getAgentStacks_oepas1.out
Output looks like:
{"getAgentStacks":{"ABLStacks":[{"Status":"Executing","Databases":[{"DBNAME":"/usr/wrk/oepas1/dbs/db1","DBTYPE":"PROGRESS","LDBNAME":"db1"}],"BrokerSessionId":"0B6911916EE1A13012E747DC77556515094A5B2672F8.oepas1","Callstack":[{"Line":14,"Routine":"server.p","Source":"/usr/wrk/oepas1/openedge/server.p"}],"StartupParams":"-pf /usr/dlc/startup.pf,-cpinternal ISO8859-1,-cpstream ISO8859-1,-cpcoll Basic,-cpcase Basic,-d mdy,-numsep 44,-numdec 46,(end .pf),-logginglevel 2,-logfile /usr/wrk/oepas100/logs/oepas1.agent.log,-uburl AppServerDC://0.0.0.0:60243/,-logname oepas1,-logentrytypes ASPlumbing,DB.Connects,-ubpropfile /usr/wrk/oepas1/conf/openedge.properties,-ASID 1,-ipver IPv4,-sectok XXXXXXXXXXXXXXXXXXXXXX,-T /usr/wrk/oepas1/temp,-db /usr/wrk/oepas1/dbs/db1","Propath":"/usr/wrk/oepas1/webapps/ROOT/WEB-INF/openedge,/usr/wrk/oepas1/openedge,/usr/dlc/tty,/usr/dlc/tty/OpenEdge.BusinessLogic.pl,/usr/dlc/tty/prodict.pl,/usr/dlc/tty/ablunit.pl,/usr/dlc/tty/adeshar.pl,/usr/dlc/tty/OpenEdge.Core.pl,/usr/dlc/tty/OpenEdge.ServerAdmin.pl,/usr/dlc/tty/adecomp.pl,/usr/dlc/tty/adecomm.pl,/usr/dlc/tty/adeedit.pl,/usr/dlc/tty/dataadmin.pl,/usr/dlc/tty/netlib/OpenEdge.Net.pl,/usr/dlc,/usr/dlc/bin","AgentSessionId":10,"OO4GLObjs":"","PersProcs":""}]}}
Get Statuses:To get the status for all threads in a given agent...
Query looks like:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getAgentStatus","<AgentId>"]}
Example:
{"O":"PASOE:type=OEManager,name=AgentManager","M":["getAgentStatus","xloyKr55Rpagx7qFYbo9bw"]}
Call looks like:
<instance-dir>/bin/oejmx.sh -R -Q <input-query-path\file> -O <output-path\file>
Example:
/usr/wrk/oepas1/bin/oejmx.sh -R -Q /usr/wrk/oepas1/temp/getAgentStatus_oepas1.qry -O /usr/wrk/oepas1/temp/getAgentStatus_oepas1.out
Output looks like:
{"getAgentStatus":{"sessions":5,"threads":5,"requests":5,"connections":5}}