Starting the vFabric GemFire JMX Agent

To start the GemFire JMX Agent, run the API call or invoke the agent script (in the GemFire bin directory):

$GEMFIRE/bin/agent start [-Jvmarg]* [-dir=dir] [prop=value]*
vmarg A JVM option passed to the Agent’s JVM. For example, to define a 1 GB heap, you would include this option: -J-Xmx1024M. To set a system property foo.bar to “true�?, you would add -J-Dfoo.bar=true.
dir The directory in which the Agent’s log file is written. The default is the current directory. For details, see Agent Log File.
prop=value

A configuration property and value passed to the Agent. You can define configuration properties on the command line or in the Agent properties file. For details, see JMX Agent Configuration Properties.

This command line instantiates a JMX Agent with non-default working directory and specifies a property file:

$GEMFIRE/bin/agent start -dir=/usr/local/gemfire 
property-file=/usr/local/gemfire/agent/myprops.props

You can use the agent.properties file to list all the different properties that should be passed to the Agent upon startup.

When you launch the JMX Agent, you identify the distributed system to which you want to connect by specifying the lookup method (used to discover and communicate with other members of the distributed system) as either IP multicast or the GemFire locator service.

You can specify these attributes as a list of prop=value pairs on the agent command line or you can connect by defining the distributed system connection configuration and lookup method in the agent.properties file. If you specify a distributed system connection configuration on the agent command line, the agent registers an AdminDistributedSystem MBean. The following are examples of starting the agent while specifying its connection properties.

To start the agent using locators:
$GEMFIRE/bin/agent start mcast-port=0 locators=host1[12345]
If you are using agent.properties, add the following lines to your configuration file:
mcast-port=0
locators=host1[12345]
To start the agent using IP multicast :
$GEMFIRE/bin/agent start mcast-port=10021
If you are using agent.properties, add the following line to your configuration file:
mcast-port=10021

Other connection properties that you may need to specify and that affect communication between members of the distributed system include SSL properties. For a full list of available connection properties, see Admin Distributed System Properties.

Additional attributes allow you to enable and configure the supported JMX connectors/adaptors (RMIConnectorServer and HTTPAdaptor). For details, see HttpAdaptor Properties and RMIConnectorServer Properties.

You can also change logging settings and have the agent provide e-mail notification for alerts and membership change events. You can specify the logging or notification properties in the Agent’s properties file or as a list of prop=value pairs on the agent command line. The properties file is the recommended method. See Logging and Statistics Refresh Properties and Email Notification Properties for a complete list of properties.