We added an internal utility to make observing a running grid easier starting in V6.1.0.3. The information was always accessible using JMX but this trapped it without a convenient way to examine it. Customers had using Mc4J or other JMX clients to look at them before but the new utility makes it a lot easier.
The utility is called xsadmin.sh (or xsadmin.bat) and this is in the bin directory along with the other scripts. The utility connects to the catalog server and then depending on command line arguments, displays various aspects of the grid. It allows the location of primaries, replicas, partitions and whats running on a particular host to be easily spotted. Here are some examples. The examples assume a catalog server running on a physical box with the host name cathost. The grid whose information is required is called 'myGrid' and the mapset is called 'mapSet', the default.
Find a list of containers showing all primaries and replicas
./xsadmin.sh -ch cathost:2809 -g myGrid -m mapSet -containers
This will show a list of all containers and each container shows the shards (primaries or replicas) running within that container. If you just want to see all containers on a particular server then:
./xsadmin.sh -ch cathost:2809 -g myGrid -m mapSet -containers -fh filterhost
This only shows containers on the host filterhost. If you just want to see data on a specific partition then
./xsadmin.sh -ch cathost:2809 -g myGrid -m mapSet -containers -fp 5
This only shows containers with shards for partition #5.
If you want a list of server hosts in the grid then:
./xsadmin.sh -ch cathost:2809 -g myGrid -m mapSet -hosts
We will be adding more flags to this utility over time and full source code for it is included in the OGInfo sample in the product.