HI Guys
Can someone help me in getting powershell script to capture the report on cluster wise cpu and memory usage for past 6 months like the attached screen shot
Those screenshots turn out to be rather smallish.
Can you attach a bigger version?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Lucd
Attached the screenshot again
Guys any help on this
You do something like this.
Adapt the start date to your requirements.
Not sure which memory metrics are shown in that 2nd graph. Can you find out?
In any case, that would be the same code, just with different metrics.
$clusterName = 'MyCluster'
$stat = 'cpu.usagemhz.average','cpu.totalmhz.average'
$start = (Get-Date).AddDays(-14)
$cluster = Get-Cluster -Name $clusterName
Get-Stat -Entity $cluster -Stat $stat -Start $start
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Lucd
Am getting below error message
Get-Stat : 24/04/2017 18:12:28 Get-Stat A specified parameter was not correct.
querySpec.size
At line:1 char:9
+ Get-Stat <<<< -Entity $cluster -Stat $stat -Start $start
+ CategoryInfo : NotSpecified: (:) [Get-Stat], InvalidArgument
+ FullyQualifiedErrorId : Client20_RuntimeDataServiceImpl_GetStats_ErrorRetreivingPerfMetrics,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetViStats
That's most probably the issue described in KB2107096
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference