OEJMX is a command-line utility you can use to:

  • List all the MBeans, including their attributes and their operations for a PAS for OpenEdge instance running on a local machine.
  • Run MBean queries.

Output from OEJMX is written to a text file. The script for OEJMX is located in the CATALINA_BASE /bin directory. This directory is typically included in your PATH environment variable.

For more information, see Use OEJMX to manage and monitor an instance .

Syntax

oejmx.{sh|bat} [ -C ] [ -Q query_parameter ] [ -O output_file_name ][ -R]

Parameters

-C
Causes a list of available bean operations and attributes to be generated. The default output location for the query results is CATALINA_BASE \temp\beanInfo-{TIMESTAMP:yyMMdd-HHmm}.txt , but the output location can be specified using the -O parameter.
-Q query_parameter

Specifies the path to a file with a set of JMX queries or a single JMX query.

There is an example JMX queries file called default.qry in CATALINA_BASE \bin\jmxqueries . To call this query from the CATALINA_BASE \bin directory, enter the following command:
proenv>oejmx -Q jmxqueries/default.qry -O default.out
A single JMX query is a JSON string with escaped quotation marks, as shown in the default.qry file. For example:
{\"O\":\"PASOE:type=OEManager,name=AgentManager\",\"M\":[\"getAgents\",\"oepas1\"]}
When using a single JMX query, the result prints to the console. For example:
proenv>oejmx -Q {\"O\":\"PASOE:type=OEManager,name=AgentManager\",\"M\":[\"getAgents\",\"oepas1\"]}
{"getAgents":{"agents":[{"agentId":"_lPkhGI8T_-INocNySRdjA","pid":"9508","state":"AVAILABLE"}]}}
Note: This parameter is ignored if the -C attribute is used.
-O output_file_name (with path)

Specifies the output filename and path, and may specify a timestamp when used with the following templates: {TIMESTAMP} or {TIMESTAMP: Java-datetime-format }

Default values:
  • If the -C argument is used: CATALINA_BASE \temp\beanInfo-{TIMESTAMP:yyMMdd-HHmm}.txt
  • If the -C argument is not used: CATALINA_BASE \temp\query-out-{TIMESTAMP:yyMMdd-HHmmss}.txt
For example, the following command produces a file in the CATALINA_BASE \temp directory called queryname-20191126-112127.txt :
proenv>oejmx -Q jmxqueries/default.qry -O C:\OpenEdge\WRK\oepas1\temp\queryname-{TIMESTAMP:yyMMdd-HHmmss}.txt
Note: This parameter is ignored if a single JMX query is used.
-R

Causes the query results only to be written to the output file. Otherwise, the output file also includes the query texts.

Note: This parameter is ignored if the -C argument or a single JMX query is used.