Dispatch /

Per-Cluster CPU and Memory Utilization and Capacity Metrics with PowerCLI

26 Feb 2014

Have you ever wanted to quickly return some key CPU and memory utilization and capacity metrics on any given vSphere cluster but avoid any GUI and “point in time spreadsheet blackholemagic?”

My customer and friend Vamshi Meda (@medavamshi) shared a very useful PowerCLI script that he wrote for some key cluster-level metrics in the environment that he supports.

Download Get-Cluster_Stats.ps1 and run the following syntax:

PowerCLI S:\> .\Get-Cluster_Stats.ps1 <ClusterName>

A sample output is provided below.

PowerCLI S:\> .\Get-Cluster_Stats.ps1 100

ClusterName                                       : 100
TotalClusterHostCount                             : 8
TotalClusterVMCount                               : 32
TotalClusterVM/Host                               : 4
TotalClusterpCPUSocket                            : 16
TotalClusterpCPUCore                              : 104
TotalClustervCPUCount                             : 70
TotalClustervCPU/pCPUCore                         : 0.7
TotalClustervCPU/pCPUCore After 1 Failover        : 1
TotalClustervCPU/pCPUCore After 2 Failvoer        : 1
TotalClusterRAMGB                                 : 1568
TotalClusterRAMGB_Failover1                       : 1312
TotalClusterRAMGB_failover2                       : 1056
TotalClusterRAMUSAGEPercent                       : 10
TotalClusterRAMUsageGB                            : 154
TotalClusterRAMFreeGB                             : 1414
TotalClusterRAMReservedGB(15%)                    : 235
RAM Available for NEW VMs in GB                   : 1179
RAM Available for NEW VMs in GB After 1 failover  : 923
RAM Available for NEW VMs in GB After 2 failover  : 667
NEW VM's that can be provisioned                  : 227
NEW VM's that can be provisioned After 1 failover : 178
NEW VM's that can be provisioned After 2 Failvoer : 128

In addition to the above the script will also provide these details for each host:


Twitter Facebook