Administration guide > Secure the deployment environment > Tutorial: Security in a mixed environment
Secure the deployment environment > Tutorial: Integrate WebSphere eXtreme Scale security in a mixed environment with an external authenticator >
Module 5: Use the xsadmin tool to monitor data grids and maps
Use the xsadmin tool to show the primary data grids and map sizes of the Grid data grid. The xsadmin 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.
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 xsadmin 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 xsadmin tool is provided by the WebSphere Application Server MBean security.
- Use a command-line tool, open the DMGR_PROFILE/bin directory.
- Run the xsadmin tool. Use the -primaries parameter as in the following examples:
![]()
./xsadmin.sh -g Grid -m mapSet -primaries -username manager -password manager1 -p 16099
![]()
xsadmin.bat -g Grid -m mapSet -primaries -username manager -password manager1 -p 16099The user name and password are passed to the catalog server for authentication.
- 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
- Run the xsadmin tool. Use the -mapsizes parameter as in the following examples:
![]()
./xsadmin.sh -g Grid -m mapSet -mapsizes -username manager -password manager1 -p 16099
![]()
xsadmin.bat -g Grid -m mapSet -mapsizes -username manager -password manager1 -p 16099The 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 -mapsizes option gets the map size from each container server, which requires the WebSphere Application Server security.
- View the command results.
************Displaying Results for Grid - Grid, MapSet - mapSet************** *** Listing Maps for xddev15Cell02\xddev15Node04\xs1 *** Map Name Partition Map Size Used Bytes (B) Shard Type Map1 0 0 0 Primary Map1 1 0 0 Primary Map1 2 1 272 Primary Map1 3 0 0 Primary Map1 4 0 0 Primary Server Total: 1 (272B)
- 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
- Optional: If you are using the xsadmin command on a WebSphere eXtreme Scale stand-alone installation, then add the following options to indicate the truststore, truststore type, and truststore password.
-trustStore -trustStoreType -trustStorePasswordYou can also set up a properties file to contain these parameters. See Attributes and arguments for xsadmin utility for more information.
Lesson checkpoint
You used the xsadmin tool to monitor data grids and maps in the configuration.