Administration guide > Monitor the environment


Monitor with the xsAdmin sample utility


Overview

With the xsadmin sample utility, you can format and display textual information about the WebSphere eXtreme Scale topology. The sample utility provides a method for parsing and discovering current deployment data, and can be used as a foundation for writing custom utilities.

The xsadmin sample utility uses MBeans to enable out-of-the box monitoring capabilities that you can extend by using the interfaces in the package...

com.ibm.websphere.objectgrid.management

You can look at the source code of the xsadmin sample application in...

wxs_home/samples/xsadmin.jar

...in a stand-alone installation or in...

wxs_home/xsadmin.jar

...in a WAS installation.

Use the xsadmin sample utility to view the current layout and specific state of the data grid, such as map content. In this example, the layout of the data grid in this task consists of a single ObjectGridA data grid with one MapA map that belongs to the MapSetA map set. This example demonstrates how you can display all active containers within a data grid and print out filtered metrics regarding the map size of the MapA map.

To run...

export JAVA_HOME=/my/java/home
cd wxs_home/bin
./xsadmin.sh

To see all possible command options, run the xsadmin utility without any arguments or with the -help option.


Enable statistics for all of the servers

./xsadmin.sh -g ObjectGridA -setstatsspec ALL=enabled


Display all online containers for a grid

./xsadmin.sh -g ObjectGridA -m MapSetA -containers
All container information is displayed...

Connect to Catalog service at localhost:1099
*** Show all online containers for grid - ObjectGridA & mapset - MapSetA
Host: 192.168.0.186
Container: server1_C-0, Server:server1, Zone:DefaultZone
Partition Shard Type
        0 Primary

Num containers matching = 1
Total known containers = 1
Total known hosts = 1


Connect to the catalog service and display information about MapA

./xsadmin.sh -g ObjectGridA -m MapSetA -mapsizes -fm MapA

The size of the specified map is displayed. An example of the output follows:

Connect to Catalog service at localhost:1099

****Displaying Results for Grid - ObjectGridA, MapSet - MapSetA*****

*** Listing Maps for server1 ***
 Map Name Partition Map Size Used Bytes (B) Shard Type
 MapA     0         0        0              Primary


Connect to catalog service using a specific JMX port

./xsadmin.sh -g ObjectGridA -m MapSetA -mapsizes -fm MapA -ch CatalogMachine -p 6645

The xsadmin sample utility connects to the MBean server that is running on a catalog server. A catalog server can run in a standalone process, WAS process, or embedded within a custom application process. Use the -ch option to specify the catalog service host name, and the -p option to specify the catalog service naming port.

The size of the specified map is displayed. An example of the output follows:

Connect to Catalog service at CatalogMachine:6645

*****Displaying Results for Grid - ObjectGridA, MapSet - MapSetA*****


*** Listing Maps for server1 ***
Map Name: MapA  Partition #: 0  Map Size: 0  Shard Type: Primary
Server Total: 0


Connect to a catalog service hosted in WAS

The -dmgr option is required when connecting to a catalog service hosted by any WAS process or cluster of processes. Use the -ch option to specify the host name if not localhost, and the -p option to override the catalog service bootstrap port, which uses the process BOOTSTRAP_ADDRESS. The -p option is only needed if the BOOTSTRAP_ADDRESS is not set to the default of 9809.

The standalone version of WXS cannot be used to connect to a catalog service hosted by a WAS process. Use the xsadmin that is script included in...

was_root/bin

...which is available when the installing WXS on WAS or WAS ND.

cd was_root/bin
./xsadmin.sh -g ObjectGridA -m MapSetA -mapsizes -fm MapA -dmgr

The size of the specified map is displayed.

Connect to Catalog service at localhost:9809

****Displaying Results for Grid - ObjectGridA, MapSet - MapSetA*****


*** Listing Maps for server1 ***
Map Name: MapA  Partition #: 0  Map Size: 0  Shard Type: Primary
Server Total: 0


List number of map entries and used heap in KB

$ xsadmin -dmgr -mapsizes

Connect to Catalog service at localhost:9809 

Warning: Detected there is more than one Placement Service MBean

******Displaying Results for Grid - DYNACACHE_REMOTE, MapSet - DYNACACHE_REMOTE********

*** Listing Maps for thinkCell01\thinkNode02\WXS_DC_ClusterMember2 ***
Map Name                     Partition Map Size Used Bytes (KB) Shard Type          
IBM_DC_PARTITIONED_baseCache 0         17       21              Primary             
IBM_DC_PARTITIONED_baseCache 1         19       23              AsynchronousReplica 
IBM_DC_PARTITIONED_baseCache 2         10       11              AsynchronousReplica 
IBM_DC_PARTITIONED_baseCache 3         19       24              AsynchronousReplica 
IBM_DC_PARTITIONED_baseCache 4         14       17              AsynchronousReplica 
...

Server Total: 618 (761KB)
*** Listing Maps for thinkCell01\thinkNode02\WXS_DC_ClusterMember1 ***
Map Name                     Partition Map Size Used Bytes (KB) Shard Type          
IBM_DC_PARTITIONED_baseCache 0         17       21              AsynchronousReplica 
IBM_DC_PARTITIONED_baseCache 1         12       14              Primary             
IBM_DC_PARTITIONED_baseCache 2         10       11              Primary             
IBM_DC_PARTITIONED_baseCache 3         8        9               Primary             
IBM_DC_PARTITIONED_baseCache 4         12       14              Primary             
...

Server Total: 648 (801KB)
Total Domain Count: 1266 (1.53MB)


See Also


Parent topic:

Monitor the deployment environment


Related concepts

Statistics overview
Monitor with vendor tools
Catalog server quorums
Catalog service


Related tasks

Monitor with the web console
Monitor with the statistics API
Monitor with WAS PMI
Monitor with MBeans
Monitor eXtreme Scale information in DB2
Ovveride catalog service quorum
Configure quorum
Access MBeans using the wsadmin tool
Access MBeans programmatically
Start and stop servers in a WAS environment

Related reference

Administer programmatically with Managed Beans (MBeans)

Related information

API documentation: Package com.ibm.websphere.objectgrid.management
developerWorks: Enhancing xsadmin for WXS
Interface PlacementServiceMBean


+

Search Tips   |   Advanced Search