Monitoring vSAN Host Resource Usage with PowerShell

Introduction: Keeping your vSAN environment healthy and balanced is critical to maintaining performance and avoiding bottlenecks. One of the best ways to stay ahead of potential issues is by proactively monitoring your ESXi host’s CPU and memory usage using PowerShell and PowerCLI. In this post, we’ll walk through a script that provides a quick overview of resource usage across your vSAN cluster — a valuable step before deciding whether to initiate a manual rebalance.


PowerShell Script to Monitor vSAN Host Resource Usage

Get-VMHost | Select Name, `
    @{N="CPU Usage MHz"; E={($_.CpuUsageMhz)}}, `
    @{N="Total CPU MHz"; E={($_.CpuTotalMhz)}}, `
    @{N="Memory Usage GB"; E={[math]::Round($_.MemoryUsageGB, 2)}}, `
    @{N="Total Memory GB"; E={[math]::Round($_.MemoryTotalGB, 2)}}

Sample Output

Host NameCPU Usage MHzTotal CPU MHzMemory Usage GBTotal Memory GB
esxi-host-016,405115,168151.94511.71
esxi-host-027,148115,168199.02511.71
esxi-host-032,089115,168124.49511.71

What This Tells You

  • CPU Load: In the sample output, CPU usage is consistently low (<10%), meaning the compute load is healthy.
  • Memory Load: Memory usage ranges from ~24% to ~39%, suggesting room for optimization or upcoming load balancing.

When to Rebalance

If you see disproportionate usage — for example, one host consistently nearing 80%+ memory while others are underutilized — it may be time to initiate a vSAN rebalance.

This script gives you the confidence to proceed with rebalance safely during production hours, especially when CPU usage is low and no resync activities are ongoing.


Conclusion Use this PowerShell command as part of your regular cluster health checks. When combined with vCenter’s vSAN resync and health dashboards, it gives you the full picture to maintain optimal performance and avoid storage imbalances.

Stay tuned for a follow-up post on triggering manual rebalancing using RVC (Ruby vSphere Console).

© 2012–2025 Jet Mariano. All rights reserved.
For usage terms, please see the Legal Disclaimer.

error: Content is protected !!