Please provide your feedback in this short Flings' survey.
fling logo of vCenter Cluster Performance Tool

vCenter Cluster Performance Tool

version 2.0 — May 04, 2017

Contributors 2

View All

Comments 14

  • profile picture of Adarsh Jagadeeshwaran
  • profile picture of Anonymous
  • profile picture of Adarsh Jagadeeshwaran
  • profile picture of Anonymous
  • profile picture of Adarsh Jagadeeshwaran
  • profile picture of Adarsh Jagadeeshwaran
  • profile picture of Anonymous
  • profile picture of Adarsh Jagadeeshwaran
View All

Summary

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

Requirements

  • 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

Instructions

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.

Changelog

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.

Similar Flings

Apr 27, 2018
fling logo of Cross vCenter VM Mobility - CLI

Cross vCenter VM Mobility - CLI

version 1.6.0

Cross vCenter VM Mobility - CLI is a command line interface (CLI) tool that can be used to migrate or clone a VM from one host to another host managed by a linked or isolated vCenter (VC) instance.

May 11, 2017
fling logo of Host Profiles CLI

Host Profiles CLI

version 1.0

The Host Profiles CLI Fling (hostprofilescli) is a command-line utility that allows vSphere administrators to perform several operations with Host Profiles that are either not currently possible through existing user interfaces, or possible only through graphical interfaces.

Jun 29, 2016
fling logo of DRS Doctor

DRS Doctor

version 1.1

DRS Doctor is a command line tool that can be used to diagnose DRS behaviour in VMware vCenter clusters. When run against a DRS enabled cluster, it records information regarding the state of the cluster, the work load distribution, DRS moves, etc., in an easy to read log format.