Monitoring with the xscmd utility

The xscmd utility replaces the xsadmin sample utility as a fully supported monitoring and administration tool. With the xscmd utility, you can display textual information about your WebSphere® eXtreme Scale topology.

Before you begin

About this task

You can use the xscmd 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 see all possible command options, run the xscmd utility without any arguments or with the -help option.

Procedure

  1. Monitor the environment with the xscmd utility.
    • To enable statistics for all of the servers, run the following command:
      • [Unix]./xscmd.sh -c setStatsSpec -spec ALL=enabled
      • [Windows]xscmd.bat -c setStatsSpec -spec ALL=enabled
    • To display all online container servers for a data grid, run the following command:
      • [Unix]./xscmd.sh -c showPlacement -g ObjectGridA -ms MapSetA
      • [Windows]xscmd.bat -c showPlacement -g ObjectGridA -ms MapSetA

      All container information is displayed.

      Attention: To obtain this information when Transport Layer Security/Secure Sockets Layer (TLS/SSL) is enabled, you must start the catalog and container servers with the JMX service port set. To set the JMX service port, you can either use the -JMXServicePort option on the startOgServer[Version 8.6 and later] or startXsServer script or you can call the setJMXServicePort method on the ServerProperties interface.
    • To display information about the maps for the ObjectGridA data grid, run the following command:
      • [Unix]./xscmd.sh -c showMapSizes -g ObjectGridA -ms MapSetA
      • [Windows]xscmd.bat -c showMapSizes -g ObjectGridA -ms MapSetA
    • To connect to the catalog service and display information about the MapA map for the entire catalog service domain, run the following command:
      • [Unix]./xscmd.sh -c showMapSizes -g ObjectGridA -ms MapSetA -m MapA -cep CatalogMachine:6645
      • [Windows]xscmd.bat -c showMapSizes -g ObjectGridA -ms MapSetA -m MapA -cep CatalogMachine:6645

      The xscmd utility connects to the MBean server that is running on a catalog server. By connecting to a single catalog server, you can retrieve information about the entire catalog service domain. A catalog server can run as a stand-alone process, WebSphere Application Server process, or embedded within a custom application process. Use the -cep option to specify the catalog service host name and port. If you include a list of catalog servers for the -cep option, the catalog servers must be within the same catalog service domain. You can retrieve statistics for one catalog service domain at a time.

    • To display the configured and runtime placement of your configuration, run one of the following commands:
      • xscmd -c placementServiceStatus
      • xscmd -c placementServiceStatus -g ObjectGridA -ms MapSetA
      • xscmd -c placementServiceStatus -ms MapSetA
      • xscmd -c placementServiceStatus -g ObjectGridA
      You can scope the command to display placement information for the entire configuration, a single data grid, a single map set, or a combination of a data grid and map set.
  2. [Version 8.6 and later]Display summaries of the replication states in the environment.
    • Display a summary of the outstanding revisions for each container server. You can run the command on a specific container server with the -ct argument, or all of the container servers if you do not include any arguments.
      • [Unix]./xscmd.sh -c showReplicationState -ct container1
      • [Windows]xscmd.bat -c showReplicationState -ct container1
      The information in the output of this command includes outbound replication and inbound replication. Outbound replication includes the changes that must get pushed out from the primary shard on the container server to its replica shards on other container servers. Inbound replication includes changes that must get pushed from primary shards on other container servers to replicas on the container server. These statistics can give you an idea of the replication health. If the number of outstanding revisions on a container server suddenly grows very high, problems with the container might exist.
    • Display a summary of the outstanding revisions for shards between catalog service domains. You can run the command on a specific container server and catalog service domain, or your entire configuration if you do not include any arguments.
      • [Unix]./xscmd.sh -c showDomainReplicationState -dom domainA -ct container1

      • [Windows]xscmd.bat -c showDomainReplicationState -dom domainA -ct container1
      The information in the output of this command includes a summary of the outstanding revisions for each container server for each linked catalog service domain. The command returns the changes to be replicated between each primary shard and the corresponding remote primary shards that are in another catalog service domain.
  3. Display the current primary catalog server. The primary catalog server is in charge of placement actions and monitoring the container servers.
    • [Unix]./xscmd.sh xscmd -c showPrimaryCatalogServer

    • [Windows]xscmd.bat xscmd -c showPrimaryCatalogServer