Please provide your feedback in this short Flings' survey.
Apr 20, 2017

Is there a Linux equivalent to Microsoft Chart Controls for Microsoft .NET? Has anyone tried this script on Linux?

Apr 14, 2014

So I'm running this as: <em>.\getClusterStats.ps1 stop view-vc cluster 33</em>, and I'm getting an error.

I was able to run it successfully with parameter 1, however its seems to be broken with other counters (33,, for instance):

Connected to view-vc
host obj: HostSystem-host-12
Counter[absolute,kiloBytes] for esx-v2.domainhere.local
host obj: HostSystem-host-365
Counter[absolute,kiloBytes] for esx-v1.domainhere.local
Exception calling "DataBindXY" with "2" argument(s): "Enumeration already finis
At C:\users\admin\Desktop\ClusterPerfFling-v2\getHostStats.ps1:228 char:40
+ $Chart.Series["Data"].Points.DataBindXY <<<< ($timeStampArray, $clusterStatsA
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException

Saving Chart to C:\Users\admin\Desktop\ClusterPerfFling-v2\Chart.png

Jan 29, 2014

Hi Team,

Can you explain how to execute this script.....

*sample syntax

Jan 30, 2014

The usage comments are in the file. I'll copy paste them here (getClusterStats.ps1):
# This script retrieves Performance metrics from a given vCenter cluster
# To use this script you need to pass in the following parameters:
# 0, the halt on error flag setting, if this is set to stop the script
# will stop on errors reported back by the powershell api
# 1, name of the vCenter Server
# 2, name of the vCenter cluster
# 3, counterId: The stat counterId to be passed in to the PerfQuerySpec; -1 to list all available counterIds

Here's an example:
<i> C:\> powershell .\getClusterStats.ps1 stop 2 </i>

Here, I pass the "stop" parameter to tell powershell to stop if it encounters an error.
The last parameter (2) is the counterId that represents "cpu.usage.average [rate,percent])".
The result I get is a chart that contains the cpu.usage.average of all hosts in the specified cluster from my vcenter server.

Please read the "Instructions" tab of this fling to understand the rest of the options that you can use with this script.
Hope that helps!

Oct 11, 2013

Hi Guys,

Could you please make this application to generate metrics for all available clusters together belong to same vCenter Server or may be multiple vCenter Servers if they are in linked mode.

Ankit Sharma

Oct 11, 2013

Also thanks for your ideas on improvements to the script. We'll work on the improvements and keep you posted.


Oct 11, 2013

I am also trying to run this scrpt by following command but no luck.

.\getClusterStats.ps1 0 vCenterName ClusterName -1

If possible, could you please post a short video tuts on how to use this script. It would be much appreciated!

Oct 11, 2013

Hi Ankit,
I'm sorry this was not explained in the notes.
The first argument is a string value that is meant to specify the program what to do when it runs into some problem.
Possible values are:
"stop", "continue" and "silentlycontinue".
Any other value will result in an error.
Could you please try specifying the first argument as one of the above values, instead of "0"?

Please let me know if you have any more issues.

Oct 11, 2013


Thanks for quick turnaround. As per your suggestion, I made that change in getClusterStats.ps1, and it worked well with no error. But, the next issue I am facing is, it does not generating any output files ( csv or chart) at the location. I am assuming the second script getHostStats.ps1 will be invoked by getClusterStats.ps1 so need to call it separately. Let me know if I am missing anything here again.

Oct 15, 2013

Have you installed Microsoft Chart Controls for Microsoft .NET Framework 3.5 on your system?
If yes, did you check the location of the chart (which is/can be specified from the program)?
In file getHostStats.ps1, look for this parameter:
##Path to chart
$chartName = "c:\powershell\Chart"

May 09, 2017

Same issue for me also no output so I installed the MS chart and pls let me know the output path should be exact location $chartName = "c:\powershell\Chart" or anything is fine if I change it in the script ../.

May 09, 2017

Ganesh, you can set the $chartName variable to any value you want. The location you specify in $chartName is where the output chart will be generated.

May 10, 2017

hmm not sure ..for me no output is generating ..

May 10, 2017

Can you check if there are any errors when running either of the scripts?