vCenter Cluster Performance Tool

Communities:
vCenter Cluster Performance Tool is a Powershell script that uses vSphere PowerCLI to obtain performance data for a cluster by aggregating information from individual hosts. You have the following options to specify in the script.
  • An “interval” of 20s or 300s. The default is 20s, and corresponds to real time statistics. 300s corresponds to the 5 min interval statistics.
  • A stats query flag to obtain the list of counter IDs available on the vCenter Server. You can then pass the desired counter ID from that list to obtain Performance metrics for the cluster.

Features

  • Gathers all data of the specified interval type that is available on each host in the specified cluster
  • Easy and a quick way of obtaining performance data for a vCenter cluster
  • Data is saved in a CSV file, which can then easily be fed into any charting software
  • A chart, in PNG format, is also generated for visualization

Note:The core distribution model for VMware PowerCLI was changed from Snapins to modules in PowerCLI 6.0. Which means that we will have to modify our scripts to not use snapins any more, in order to make them work with newer versions of vSphere.

ChartMedium
  • VMware vCenter Server 5.0 and above
  • PowerShell supporting Windows system (Windows XP and later)
  • VMware vSphere PowerCLI that is compatible with the vCenter Server
  • Microsoft Chart Controls for Microsoft .NET Framework 3.5

1. Installation

You need to install VMware PowerCLI and Microsoft Chart Controls. The PowerShell script does not need additional installation.

2. Before Running

Once installed, you will need to modify the scripts to specify locations of files as follows.

File: getClusterStats.ps1

Change $psCommand and $getHostStatsPrg to point to the location of powershell.exe and getHostStats.ps1 respectively.

Change $interval, if needed. This specifies the kind of Performance Statistics Samples to retrieve (in seconds) – either 20 (real-time, default), or 300 (5min samples).

File: getHostStats.ps1

Change $storeHostStats, $storeClsStats and $chartName to point to the locations of the individual host stats output file, aggregated cluster stats output file, and the performance chart file respectively.

3. CounterId

You can list all available counterIds on your vCenter Server by passing -1 for the counterId argument to getClusterStats.ps1.

From that list you can pass the desired counterId to the same argument to retrieve Performance Statistics for the given cluster. Note that not all of those counterIds may be available for a cluster object. Please refer to the VMware vSphere Web Services SDK Documentation for details on this topic.

Version 2.0 of our fling has the following changes.

* File: getClusterStats.ps1 ** removed line "add-pssnapin VMware.VimAutomation.Core"
** added line "Import-Module VMware.VimAutomation.Core"
* File: getHostStats.ps1
** removed line "add-pssnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue"
** added line "Import-Module VMware.VimAutomation.Core"

For more information about these changes, please refer PowerCLI 6.0 – Introducing PowerCLI Modules.

Add a Comment
Report a Bug