Cluster management-useful commands

  • 18 September 2021
  • 0 replies

Userlevel 1
Badge +3

Although Prism is user friendly, it will be nice to know some commands that are useful for cluster management. 


  • Cluster status

The cluster status or “cs | grep -v UP” command gives the status(up or down ) of all the CVMs and their services. Running this command is helpful when there are alerts in the prism about services being down on certain CVMs. 


  • Metadata ring

The command “nodetool -h0 ring” shows if all the CVMs are a part of the metadata ring. Being in a metadata ring is essential for the CVM to be an active part of the cluster and handle its designated responsibilities. It is essential to run this command after every hardware replacement to make sure the node is back sharing responsibilities of the cluster.


  • Health check

Most of the problems in the cluster are easily diagnosed by the health check command “ncc health_checks run_all” At the end of every WARN/INFO/ERR/FAIL plug in we see a KB to further troubleshoot the issue. This check is essential to make sure if the cluster health is ok.


  • Cluster info

Real quick information about the cluster can be obtained by “ncli cluster info”


  • List NTP sources

The command “ncli cluster get-ntp-servers” lists the NTP servers configured in the CVMs.


  • Discover the nodes 

For the new installs using foundation, the new nodes should be discoverable from the existing CVMs in the cluster using the following command “ncli cluster discover_nodes”


  • Obtain ESXi version from the CVM

To get the ESXI version of the host from the CVM console, use the command “for i in `hostips` ; do echo esx $i ; ssh root@$i 'vmware -vl' ; done”


  • Date and time in the CVMs

The command “allssh date” gives the current date and time in the CVM.


  • Print the IPMI information

To print the IPMI information from CVM, use “ipmitool lan print” for AHV or “/ipmitool lan print” from the ESXi host. This command should specifically be run at the host level.


  • Genesis status

One useful command to observe if any services are crashing on a certain CVM is “watch -d genesis status”. The status of the services refreshes every 2.0 sec and the flickering PIDs indicate service crashes in the CVMs.


  • Place the CVM in maintenance mode

CVM should be placed in maintenance mode only when essential and if the Data resiliency is OK from the home page of the Prism Element.  To place the CVM in maintenance, use the following command:


  1. To list the CVM-ID, use “svmips -d” from any CVM in the cluster.

  2. To place a CVM in MM, “ncli host edit id=CVM-ID enable-maintenance-mode=true from any other CVM.

  3. To take the CVM out of MM, “ncli host edit id=CVM-ID enable-maintenance-mode=false

This topic has been closed for comments