Administration guide > Monitor the environment
Monitor with managed beans (MBeans)
Used managed beans (MBeans) to track statistics in the environment.
Before you begin
For the attributes to be recorded, enable statistics. You can enable statistics in one of the following ways:
- With the server properties file:
You can enable statistics in the server properties file with a key-value entry of statsSpec=<StatsSpec>. Some examples of possible settings follow:
- To enable all statistics, use statsSpec=all=enabled
- To enable only ObjectGrid statistics, use statsSpec=og.all=enabled. To see a description of all possible statistics specifications, see the StatsSpec API.
For more information about the server properties file, see Server properties file.
- With a managed bean:
You can enable statistics using the StatsSpec attribute on the ObjectGrid MBean. For more information, see the StatsSpec API.
- Programmatically:
You can also enable statistics programmatically with the StatsAccessor interface, which is retrieved with the StatsAccessorFactory class. Use this interface in a client environment or when monitor a data grid that is running in the current process.
Procedure
- Access MBean statistics using the wsadmin tool.
For more information, see Access Managed Beans (MBeans) using the wsadmin tool.
- Access MBean statistics programmatically.
For more information, see Access Managed Beans (MBeans) programmatically.
Example
For an example of how to use managed beans, see Monitor with the xsAdmin sample utility.
Parent topic:
Monitor the deployment environment
Related concepts
Related tasks
Monitor with the statistics API
Monitor with the xsAdmin sample utility
Monitor eXtreme Scale information in DB2
Access Managed Beans (MBeans) using the wsadmin tool
Access Managed Beans (MBeans) programmatically
Related reference
Administer programmatically with Managed Beans (MBeans)
Related information
API documentation: Package com.ibm.websphere.objectgrid.management