Useful Ruby Shell vSAN Commands

Posted by

Lately, I have had people messaging asking to help them troubleshoot their environment. Everything from random performance impacts to my SQL DBA says I have a disk IO issue. I thought I would take the time to post a few helpful ruby shell commands I use to help me keep an eye on my own environment.

Cluster level# vsan.whatif_host_failures 0 -s

In a vSAN environment you can never plan for failure enough. The above command lets you see what the impact would be if you were to lose a host in your cluster.

Cluster level# vsan.resync_dashboard . -r 60

Every wonder if you have a resync going on in the backend? Why you may all of a sudden have a performance issue and not understand why? The above command lets you see if an active resync is going on in your environment and the -r 60 allows for it to update every minute.

Cluster# vsan.disks_stats .

The important item to view is physical used. If a single capacity drive hits 80% used it will cause a resync to incur in the background.

Cluster# vsan.proactive_rebalance . -s -t 10800

Speaking of keeping your drives balanced 🙂 The above command is in seconds (3 hours) and will kick off a proactive balance in the background. If you want more hours increase the 10800 to say 28800 for 8 hours.

VM# vsan.vm_perf_stats VM_Name

This specific command is executed on a per-VM basis and not against the entire cluster or VSAN datastore. Use this if you want to investigate performance issues for a particular VM. This command will sample disk performance over a period of 20 seconds. This command will provide you with ‘read/write’ information IOPS, throughput and latency.

Ruby CLI Guide:

https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/products/vsan/vmware-ruby-vsphere-console-command-reference-for-virtual-san.pdf

Summary:
There are plenty of useful Ruby Shell commands that can be used to monitor or troubleshoot your vSAN/VxRail environment. The above mentioned are not all of them but a few I find useful in my day to day.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s