Running the Agent and GFMon

Configure and run your GemFire JMX Agent and the GFMon tool. Use GFMon to connect to the agent and retrieve information about the running GemFire system.

GFMon requires a GemFire distributed system with a running Admin Java Management Extensions (JMX) Agent with RMI enabled. These steps take you through GemFire configuration and startup at a high level. For detailed information on GemFire system configuration and on running a GemFire system and a GemFire JMX agent, see the GemFire User's Guide.

The instructions that follow require a running GemFire distributed system. You need to know how system member discovery is configured in the system. If you are not sure how your system is being run, see the section on Topology and Communication in the GemFire User's Guide

Configuring and Starting a JMX Agent

Start a JMX Admin Agent in the distributed system you want to monitor with GFMon. For information on how to configure a JMX Admin Agent, see the information on using JMX in the GemFire User's Guide.
  1. Start the agent, specifying the RMI listen port and RMI-enabled parameter as part of the start-up arguments or as part of the file. Example:
    agent start rmi-enabled=true rmi-port=1099
    Note: The Agent uses a default port of 1099 to listen for incoming RMI connections from JMX clients, including GFMon. If you specify an RMI-port that is not available, the JMX Agent reports an error during start-up.
  2. Verify the RMI-port value from the agent.log file, which is created when the agent starts. You can also list the active connections using the command: netstat-a.
  3. Record the agent host-name and the RMI-port number from the agent.log file.
After you start the GemFire JMX Agent in the GemFire distributed system, you can use the agent host name and the RMI port to connect GFMon to the system.

Starting an Admin Agent with a Non-Default Statistics Refresh Interval

GemFire refreshes statistic resources periodically and propagates these values to the JMX Admin Agent. GFMon gets updated values of these statistics from the admin agent. If your admin agent connects to a system running GemFire version 6.0 or more, you can optionally set this refresh-interval (specified in seconds) while starting the agent. For systems running GemFire version 6.6.2 or earlier, the default value for refresh-interval is 5 seconds. For systems running GemFire version 6.6.3, the default value for refresh-interval is 15 seconds. The following command changes it to 3 seconds:
agent start rmi-enabled=true rmi-port=1099 refresh-interval=3

Starting an Admin Agent Using Locators

To start the agent in a system using locators for member discovery, specify the connection string of the locator. This can be a comma-delimited host[port] list specified in the file or on the command line as part of the start-up arguments. Example:
agent start locators=bishop[10334] mcast-port=0

When you use locators, set the mcast-port to 0.

Starting an Admin Agent Using Multicast

To start the agent in a system using multicast for member discovery, specify the mcast-port for the system. This can be specified in the file or on the command line as part of the start-up arguments. Example:
agent start mcast-port=10334

Starting GFMon and Connecting to the JMX Agent

To start GFMon:
  1. Set the environment variable GEMFIRE to the GemFire product directory. This must be the same as the GemFire product directory that is being used by the admin agent GFMon is going to connect to. The GFMon start-up scripts use the gemfire.jar in the lib subdirectory of GEMFIRE directory to launch GFMon.
  2. Launch GFMon by running gfmon.bat on Windows platforms and gfmon on Linux platforms.
  3. In GFMon's Quick Connect section, enter the host name of the host on which the JMX Admin Agent is running, and the RMI-port number for the agent.
  4. Click Connect to create the connection.

Running Multiple Instances of GFMon

You can run multiple instances of GFMon by invoking the GFMon script multiple times.

Disconnecting from the Admin Agent

To disconnect from an agent, click Disconnect on the left panel of the user interface.