Module 5: Use the xscmd utility to monitor data grids and maps

You can use the xscmd utility to show the primary data grids and map sizes of the Grid data grid. The xscmd tool uses the MBean to query all of the data grid artifacts, such as primary shards, replica shards, container servers, map sizes, and other data.

About this task

In this tutorial, the catalog server is running as a stand-alone Java SE server. The container servers are running in WebSphere® Application Server application servers.

For the catalog server, a MBean server is created in the stand-alone Java virtual machine (JVM). When you use the xscmd tool on the catalog server, WebSphere eXtreme Scale security is used.

For the container servers, the WebSphere eXtreme Scale run time registers the Managed Beans (MBean) with the MBean server that is created by the WebSphere Application Server run time. The security that is used by the xscmd tool is provided by the WebSphere Application Server MBean security.

Procedure

  1. Using a command-line tool, open the DMGR_PROFILE/bin directory.
  2. Run the xscmd tool.
    Use the -c showPlacement -st P parameters as in the following examples:
    [Linux][Unix]
    xscmd.sh -c showPlacement -cep localhost:16099 -g Grid -ms mapSet -sf P 
    -user manager -pwd manager1 
    [Windows]
    xscmd.bat -c showPlacement -cep localhost:16099 -g Grid -m mapSet -sf P 
    -user manager -pwd manager1 
    Attention:
    If you use the following command to access the data grid, you might also be authorized to perform administrative actions, such as listAllJMXAddresses:
    ./xscmd.sh -user <user> -password <password> <other_parameters>
    If this operation works for this user, then any xscmd operation might also be performed by the same user. For more information, see Troubleshooting security
    The user name and password are passed to the catalog server for authentication.
  3. View the command results.
    *** Showing all primaries for grid - Grid & mapset - mapSet
    Partition Container Host Server
    0 myCell02\myNode04\xs2_C-1 myhost.mycompany.com myCell02\myNode04\xs2
    1 myCell02\myNode04\xs2_C-1 myhost.mycompany.com myCell02\myNode04\xs2
    2 myCell02\myNode04\xs2_C-1 myhost.mycompany.com myCell02\myNode04\xs2
    3 myCell02\myNode04\xs2_C-1 myhost.mycompany.com myCell02\myNode04\xs2
    4 myCell02\myNode04\xs2_C-1 myhost.mycompany.com myCell02\myNode04\xs2
  4. Run the xscmd tool.
    Use the -c showMapSizes parameter as in the following examples:
    [Linux][Unix]
    xscmd.sh -c showMapSizes -cep localhost:16099 -g Grid -ms mapSet  -user manager -pwd manager1
    [Windows]
    xscmd.bat -c showMapSizes -cep localhost:16099 -g Grid -ms mapSet -user manager -pwd manager1
    The user name and password are passed to the catalog server for authentication. After you run the command, you are prompted for the WebSphere Application Server user ID and password to authenticate to WebSphere Application Server. You must provide this login information because the -c showMapSizes option gets the map size from each container server, which requires the WebSphere Application Server security.
  5. Optional: You can change the PROFILE/properties/sas.client.props file to run the command without the user ID and password being required.
    Change the com.ibm.CORBA.loginSource property from prompt to properties and then provide the user ID and password. An example of the properties in the PROFILE/properties/sas.client.props file follows:
    com.ibm.CORBA.loginSource=properties
    # RMI/IIOP user identity
    com.ibm.CORBA.loginUserid=Admin
    com.ibm.CORBA.loginPassword=xxxxxx
  6. Optional: If you are using the xscmd command on a WebSphere eXtreme Scale stand-alone installation, then you must add the following options:
    • If you are using WebSphere eXtreme Scale security:
      -user
      -pwd
    • If you are using WebSphere eXtreme Scale security with custom credential generation:
      -user
      -pwd
      -cgc
      -cgp
    • If SSL is enabled:
      -tt
      -cxpv
      -prot
      -ks
      -ksp
      -kst
      -ts
      -tsp
      -tst
    If WebSphere eXtreme Scale security and SSL are both enabled, then both set of parameters are required.
Related tasksMonitoring with the xscmd utilityThe 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.Administering with the xscmd utilityWith the xscmd utility, you can complete administrative tasks in the environment such as: establishing multi-master replication links, overriding quorum, and stopping groups of servers with the teardown command.

Lesson checkpoint

You used the xscmd tool to monitor data grids and maps in your configuration.