VMware Cloud Community
proseti
Enthusiast
Enthusiast
Jump to solution

IntervalMins, IntervalSecs doesn't work?

Hello,

I've been trying to get some average stats from VMs and I've been facing up some problems.

When I type below command I get samples in 20seconds interval. IntervalMins doesn't work properly
Get-Stat -Entity (Get-VMHost HOSTNAME) -Stat cpu.usage.average -IntervalMins 5 | where{$_.instance -eq ""}

The same situation with for example this command:

Get-VM "VMNAME" | Get-Stat -Stat cpu.usage.average -IntervalMins 5 | Where{$_.Instance -eq ""}

Second problem is, that these commands shows me stats ONLY for 1 hour back ONLY for VMs. With Hosts stats I can do (Get-Date).AddDays(-4) -Finish (Get-Date).AddDays(-3) and it works well.
I can add that in vcenter I see older stats for VMs than 1 hour.

Anybody knows why it happens?

Get-StatInterval on specific host where VM is placed shows nothing.

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

The required statistics levels are to be found under the PerformanceManager entry in the API Reference.
Let's take the cpu.usage.average entry.

cpu-usage.png

The average is available with Statistics Level 1, the minimum and maximum require Statistics Level 4.

Since you see the Historical Intervals in the vSPhere Client, it could be that you are connected to the ESXi node, and not the vCenter.

When connected to an ESXi node, you get 1 hour of metrics with a 20 seconds interval.

Check what is in $global:defaultviserver.

Is that the vCenter?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
5 Replies
Sreejesh_D
Virtuoso
Virtuoso
Jump to solution

Hi,

Can you check the powercli version you are using?  Commands works fine on version 6.5R1.

If you have removed and reconnected the hosts to inventory then you can see the events only from that moment.

PowerCLI C:\> Get-PowerCLIVersion

PowerCLI Version

----------------

   VMware PowerCLI 6.5 Release 1 build 4624819

---------------

Component Versions

---------------

   VMware Cis Core PowerCLI Component 6.5 build 4624453

   VMware VimAutomation Core PowerCLI Component 6.5 build 4624450

   VMWare ImageBuilder PowerCLI Component 6.5 build 4561891

   VMWare AutoDeploy PowerCLI Component 6.5 build 4561891

   VMware Vds PowerCLI Component 6.5 build 4624695

   VMware Cloud PowerCLI Component 6.5 build 4624821

   VMware HA PowerCLI Component 6.0 build 4525225

   VMware Licensing PowerCLI Component 6.5 build 4624822

   VMware PCloud PowerCLI Component 6.5 build 4624825

   VMware Storage PowerCLI Component 6.5 build 4624820

PowerCLI C:\> Get-VM "vm1" | Get-Stat -Stat cpu.usage.average -IntervalMins 5 | Where{$_.Instance -eq ""}

MetricId                Timestamp                          Value Unit     Instance

--------                ---------                          ----- ----     --------

cpu.usage.average       05/06/2017 11:20:00 AM              3.15 %               

cpu.usage.average       05/06/2017 11:15:00 AM              3.01 %               

cpu.usage.average       05/06/2017 11:10:00 AM              3.13 %               

cpu.usage.average       05/06/2017 11:05:00 AM              3.23 %               

cpu.usage.average       05/06/2017 11:00:00 AM              2.95 %               

cpu.usage.average       05/06/2017 10:55:00 AM               3.2 %               

cpu.usage.average       05/06/2017 10:50:00 AM              3.37 %               

cpu.usage.average       05/06/2017 10:45:00 AM              2.99 %               

cpu.usage.average       05/06/2017 10:40:00 AM              3.08 %               

cpu.usage.average       05/06/2017 10:35:00 AM              3.11 %               

cpu.usage.average       05/06/2017 10:30:00 AM              2.83 %               

cpu.usage.average       05/06/2017 10:25:00 AM              3.12 %               

cpu.usage.average       05/06/2017 10:20:00 AM              3.18 %               

cpu.usage.average       05/06/2017 10:15:00 AM              3.04 %               

cpu.usage.average       05/06/2017 10:10:00 AM              3.14 %               

cpu.usage.average       05/06/2017 10:05:00 AM              3.18 %               

cpu.usage.average       05/06/2017 10:00:00 AM              2.92 %               

cpu.usage.average       05/06/2017 09:55:00 AM              3.17 %               

cpu.usage.average       05/06/2017 09:50:00 AM              3.29 %               

cpu.usage.average       05/06/2017 09:45:00 AM              2.92 %               

cpu.usage.average       05/06/2017 09:40:00 AM                 3 %               

cpu.usage.average       05/06/2017 09:35:00 AM              3.17 %               

cpu.usage.average       05/06/2017 09:30:00 AM              2.83 %               

cpu.usage.average       05/06/2017 09:25:00 AM              3.15 %               

cpu.usage.average       05/06/2017 09:20:00 AM              3.08 %               

cpu.usage.average       05/06/2017 09:15:00 AM              2.95 %               

cpu.usage.average       05/06/2017 09:10:00 AM              3.09 %               

cpu.usage.average       05/06/2017 09:05:00 AM              3.19 %               

cpu.usage.average       05/06/2017 09:00:00 AM              2.86 %               

cpu.usage.average       05/06/2017 08:55:00 AM                 3 %               

cpu.usage.average       05/06/2017 08:50:00 AM              3.14 %               

cpu.usage.average       05/06/2017 08:45:00 AM              2.89 %               

cpu.usage.average       05/06/2017 08:40:00 AM                 3 %               

cpu.usage.average       05/06/2017 08:35:00 AM              3.06 %               

cpu.usage.average       05/06/2017 08:30:00 AM              2.75 %               

cpu.usage.average       05/06/2017 08:25:00 AM              3.14 %               

cpu.usage.average       05/06/2017 08:20:00 AM              3.02 %               

cpu.usage.average       05/06/2017 08:15:00 AM              2.88 %               

cpu.usage.average       05/06/2017 08:10:00 AM              3.15 %               

cpu.usage.average       05/06/2017 08:05:00 AM              3.17 %               

cpu.usage.average       05/06/2017 08:00:00 AM               3.1 %               

cpu.usage.average       05/06/2017 07:55:00 AM               3.2 %               

cpu.usage.average       05/06/2017 07:50:00 AM              3.22 %               

cpu.usage.average       05/06/2017 07:45:00 AM              2.87 %               

cpu.usage.average       05/06/2017 07:40:00 AM              2.97 %               

cpu.usage.average       05/06/2017 07:35:00 AM              3.08 %               

cpu.usage.average       05/06/2017 07:30:00 AM              2.85 %               

cpu.usage.average       05/06/2017 07:25:00 AM              2.97 %               

cpu.usage.average       05/06/2017 07:20:00 AM              2.93 %               

cpu.usage.average       05/06/2017 07:15:00 AM               2.8 %               

cpu.usage.average       05/06/2017 07:10:00 AM              3.09 %               

cpu.usage.average       05/06/2017 07:05:00 AM              3.22 %               

cpu.usage.average       05/06/2017 07:00:00 AM              2.81 %               

cpu.usage.average       05/06/2017 06:55:00 AM              3.08 %               

cpu.usage.average       05/06/2017 06:50:00 AM              3.34 %               

cpu.usage.average       05/06/2017 06:45:00 AM              2.85 %               

cpu.usage.average       05/06/2017 06:40:00 AM                 3 %               

cpu.usage.average       05/06/2017 06:35:00 AM              3.13 %               

cpu.usage.average       05/06/2017 06:30:00 AM              2.75 %               

cpu.usage.average       05/06/2017 06:25:00 AM               2.9 %               

cpu.usage.average       05/06/2017 06:20:00 AM               2.9 %               

cpu.usage.average       05/06/2017 06:15:00 AM              2.71 %               

cpu.usage.average       05/06/2017 06:10:00 AM              2.91 %               

cpu.usage.average       05/06/2017 06:05:00 AM              2.85 %               

cpu.usage.average       05/06/2017 06:00:00 AM               3.1 %               

cpu.usage.average       05/06/2017 05:55:00 AM              3.21 %               

cpu.usage.average       05/06/2017 05:50:00 AM              3.31 %               

cpu.usage.average       05/06/2017 05:45:00 AM              2.97 %               

cpu.usage.average       05/06/2017 05:40:00 AM              3.09 %               

cpu.usage.average       05/06/2017 05:35:00 AM              3.28 %               

cpu.usage.average       05/06/2017 05:30:00 AM              2.97 %               

cpu.usage.average       05/06/2017 05:25:00 AM              3.18 %               

cpu.usage.average       05/06/2017 05:20:00 AM              3.15 %               

cpu.usage.average       05/06/2017 05:15:00 AM              3.11 %               

cpu.usage.average       05/06/2017 05:10:00 AM              3.08 %               

cpu.usage.average       05/06/2017 05:05:00 AM              3.08 %               

cpu.usage.average       05/06/2017 05:00:00 AM                 3 %               

cpu.usage.average       05/06/2017 04:55:00 AM               3.2 %               

cpu.usage.average       05/06/2017 04:50:00 AM              4.88 %               

cpu.usage.average       05/06/2017 04:45:00 AM              3.06 %               

cpu.usage.average       05/06/2017 04:40:00 AM              3.24 %               

cpu.usage.average       05/06/2017 04:35:00 AM              3.37 %               

cpu.usage.average       05/06/2017 04:30:00 AM              2.99 %               

cpu.usage.average       05/06/2017 04:25:00 AM               3.3 %               

cpu.usage.average       05/06/2017 04:20:00 AM              3.18 %               

cpu.usage.average       05/06/2017 04:15:00 AM              3.11 %               

cpu.usage.average       05/06/2017 04:10:00 AM               3.2 %               

cpu.usage.average       05/06/2017 04:05:00 AM               3.3 %               

cpu.usage.average       05/06/2017 04:00:00 AM              2.96 %               

cpu.usage.average       05/06/2017 03:55:00 AM               3.3 %               

cpu.usage.average       05/06/2017 03:50:00 AM              3.49 %               

cpu.usage.average       05/06/2017 03:45:00 AM              3.01 %               

cpu.usage.average       05/06/2017 03:40:00 AM              3.16 %               

cpu.usage.average       05/06/2017 03:35:00 AM              3.25 %               

cpu.usage.average       05/06/2017 03:30:00 AM              3.03 %               

cpu.usage.average       05/06/2017 03:25:00 AM               3.3 %               

cpu.usage.average       05/06/2017 03:20:00 AM              3.25 %               

cpu.usage.average       05/06/2017 03:15:00 AM              3.04 %               

cpu.usage.average       05/06/2017 03:10:00 AM              3.25 %               

cpu.usage.average       05/06/2017 03:05:00 AM              3.33 %               

cpu.usage.average       05/06/2017 03:00:00 AM              2.99 %               

cpu.usage.average       05/06/2017 02:55:00 AM              3.29 %               

cpu.usage.average       05/06/2017 02:50:00 AM              3.54 %               

cpu.usage.average       05/06/2017 02:45:00 AM              3.01 %               

cpu.usage.average       05/06/2017 02:40:00 AM               3.2 %               

cpu.usage.average       05/06/2017 02:35:00 AM              3.29 %               

cpu.usage.average       05/06/2017 02:30:00 AM              2.96 %               

cpu.usage.average       05/06/2017 02:25:00 AM              3.23 %               

cpu.usage.average       05/06/2017 02:20:00 AM              3.26 %               

cpu.usage.average       05/06/2017 02:15:00 AM              2.95 %               

cpu.usage.average       05/06/2017 02:10:00 AM              3.12 %               

cpu.usage.average       05/06/2017 02:05:00 AM              3.21 %               

cpu.usage.average       05/06/2017 02:00:00 AM              2.85 %               

cpu.usage.average       05/06/2017 01:55:00 AM              3.29 %               

cpu.usage.average       05/06/2017 01:50:00 AM               3.4 %               

cpu.usage.average       05/06/2017 01:45:00 AM              2.98 %               

cpu.usage.average       05/06/2017 01:40:00 AM              3.26 %               

cpu.usage.average       05/06/2017 01:35:00 AM              3.29 %               

cpu.usage.average       05/06/2017 01:30:00 AM              2.97 %               

cpu.usage.average       05/06/2017 01:25:00 AM              3.25 %               

cpu.usage.average       05/06/2017 01:20:00 AM              3.13 %               

cpu.usage.average       05/06/2017 01:15:00 AM              2.95 %               

cpu.usage.average       05/06/2017 01:10:00 AM              3.14 %               

cpu.usage.average       05/06/2017 01:05:00 AM              3.32 %               

cpu.usage.average       05/06/2017 01:00:00 AM              2.87 %               

cpu.usage.average       05/06/2017 12:55:00 AM              3.16 %               

cpu.usage.average       05/06/2017 12:50:00 AM              3.37 %               

cpu.usage.average       05/06/2017 12:45:00 AM              2.93 %               

cpu.usage.average       05/06/2017 12:40:00 AM              3.05 %               

cpu.usage.average       05/06/2017 12:35:00 AM              3.08 %               

cpu.usage.average       05/06/2017 12:30:00 AM              2.64 %               

cpu.usage.average       05/06/2017 12:25:00 AM              2.97 %               

cpu.usage.average       05/06/2017 12:20:00 AM              2.94 %               

cpu.usage.average       05/06/2017 12:15:00 AM              2.89 %               

cpu.usage.average       05/06/2017 12:10:00 AM               2.9 %               

cpu.usage.average       05/06/2017 12:05:00 AM              3.01 %               

cpu.usage.average       05/06/2017 12:00:00 AM              2.76 %               

cpu.usage.average       04/06/2017 11:55:00 PM              3.08 %               

cpu.usage.average       04/06/2017 11:50:00 PM              3.41 %               

cpu.usage.average       04/06/2017 11:45:00 PM              3.01 %               

cpu.usage.average       04/06/2017 11:40:00 PM              3.21 %               

cpu.usage.average       04/06/2017 11:35:00 PM              3.32 %               

cpu.usage.average       04/06/2017 11:30:00 PM              3.07 %               

cpu.usage.average       04/06/2017 11:25:00 PM              3.47 %               

cpu.usage.average       04/06/2017 11:20:00 PM              3.29 %               

cpu.usage.average       04/06/2017 11:15:00 PM              3.08 %               

cpu.usage.average       04/06/2017 11:10:00 PM              3.19 %               

cpu.usage.average       04/06/2017 11:05:00 PM              3.35 %               

cpu.usage.average       04/06/2017 11:00:00 PM              3.02 %               

cpu.usage.average       04/06/2017 10:55:00 PM              3.34 %               

cpu.usage.average       04/06/2017 10:50:00 PM              3.58 %               

cpu.usage.average       04/06/2017 10:45:00 PM              3.12 %               

cpu.usage.average       04/06/2017 10:40:00 PM              3.29 %               

cpu.usage.average       04/06/2017 10:35:00 PM              3.35 %               

cpu.usage.average       04/06/2017 10:30:00 PM              3.08 %               

cpu.usage.average       04/06/2017 10:25:00 PM              3.35 %               

cpu.usage.average       04/06/2017 10:20:00 PM              3.28 %               

cpu.usage.average       04/06/2017 10:15:00 PM              3.11 %               

cpu.usage.average       04/06/2017 10:10:00 PM              3.21 %               

cpu.usage.average       04/06/2017 10:05:00 PM               3.3 %               

cpu.usage.average       04/06/2017 10:00:00 PM              3.04 %               

cpu.usage.average       04/06/2017 09:55:00 PM              3.27 %               

cpu.usage.average       04/06/2017 09:50:00 PM              3.55 %               

cpu.usage.average       04/06/2017 09:45:00 PM              3.27 %               

cpu.usage.average       04/06/2017 09:40:00 PM              3.34 %               

cpu.usage.average       04/06/2017 09:35:00 PM              3.47 %               

cpu.usage.average       04/06/2017 09:30:00 PM              3.09 %               

cpu.usage.average       04/06/2017 09:25:00 PM              3.34 %               

cpu.usage.average       04/06/2017 09:20:00 PM              3.27 %               

cpu.usage.average       04/06/2017 09:15:00 PM               3.1 %               

cpu.usage.average       04/06/2017 09:10:00 PM              3.26 %               

cpu.usage.average       04/06/2017 09:05:00 PM              3.31 %               

cpu.usage.average       04/06/2017 09:00:00 PM              3.06 %               

cpu.usage.average       04/06/2017 08:55:00 PM               3.3 %               

cpu.usage.average       04/06/2017 08:50:00 PM              4.65 %               

cpu.usage.average       04/06/2017 08:45:00 PM              3.04 %               

cpu.usage.average       04/06/2017 08:40:00 PM              3.06 %               

cpu.usage.average       04/06/2017 08:35:00 PM              3.39 %               

cpu.usage.average       04/06/2017 08:30:00 PM              3.11 %               

cpu.usage.average       04/06/2017 08:25:00 PM              3.29 %               

cpu.usage.average       04/06/2017 08:20:00 PM              3.28 %               

cpu.usage.average       04/06/2017 08:15:00 PM              3.14 %               

cpu.usage.average       04/06/2017 08:10:00 PM              3.19 %               

cpu.usage.average       04/06/2017 08:05:00 PM              3.36 %               

cpu.usage.average       04/06/2017 08:00:00 PM              3.05 %               

cpu.usage.average       04/06/2017 07:55:00 PM              3.27 %               

cpu.usage.average       04/06/2017 07:50:00 PM              3.69 %               

cpu.usage.average       04/06/2017 07:45:00 PM              3.09 %               

cpu.usage.average       04/06/2017 07:40:00 PM              3.33 %               

cpu.usage.average       04/06/2017 07:35:00 PM              3.38 %               

cpu.usage.average       04/06/2017 07:30:00 PM              3.08 %               

cpu.usage.average       04/06/2017 07:25:00 PM              3.29 %               

cpu.usage.average       04/06/2017 07:20:00 PM              3.32 %               

cpu.usage.average       04/06/2017 07:15:00 PM              3.14 %               

cpu.usage.average       04/06/2017 07:10:00 PM              3.24 %               

cpu.usage.average       04/06/2017 07:05:00 PM              3.35 %               

cpu.usage.average       04/06/2017 07:00:00 PM              3.09 %               

cpu.usage.average       04/06/2017 06:55:00 PM              3.37 %               

cpu.usage.average       04/06/2017 06:50:00 PM              3.76 %               

cpu.usage.average       04/06/2017 06:45:00 PM              3.14 %               

cpu.usage.average       04/06/2017 06:40:00 PM              3.31 %               

cpu.usage.average       04/06/2017 06:35:00 PM              3.38 %               

cpu.usage.average       04/06/2017 06:30:00 PM              3.06 %               

cpu.usage.average       04/06/2017 06:25:00 PM               3.3 %               

cpu.usage.average       04/06/2017 06:20:00 PM              3.57 %               

cpu.usage.average       04/06/2017 06:15:00 PM              3.12 %               

cpu.usage.average       04/06/2017 06:10:00 PM               3.3 %               

cpu.usage.average       04/06/2017 06:05:00 PM              3.36 %               

cpu.usage.average       04/06/2017 06:00:00 PM              3.09 %               

cpu.usage.average       04/06/2017 05:55:00 PM              3.39 %               

cpu.usage.average       04/06/2017 05:50:00 PM              4.01 %               

cpu.usage.average       04/06/2017 05:45:00 PM              3.12 %               

cpu.usage.average       04/06/2017 05:40:00 PM               3.2 %               

cpu.usage.average       04/06/2017 05:35:00 PM              3.27 %               

cpu.usage.average       04/06/2017 05:30:00 PM              3.07 %               

cpu.usage.average       04/06/2017 05:25:00 PM               3.3 %               

cpu.usage.average       04/06/2017 05:20:00 PM              3.25 %               

cpu.usage.average       04/06/2017 05:15:00 PM              3.09 %               

cpu.usage.average       04/06/2017 05:10:00 PM              3.33 %               

cpu.usage.average       04/06/2017 05:05:00 PM              3.46 %               

cpu.usage.average       04/06/2017 05:00:00 PM              3.03 %               

cpu.usage.average       04/06/2017 04:55:00 PM              3.36 %               

cpu.usage.average       04/06/2017 04:50:00 PM              3.48 %               

cpu.usage.average       04/06/2017 04:45:00 PM              2.95 %               

cpu.usage.average       04/06/2017 04:40:00 PM              3.14 %               

cpu.usage.average       04/06/2017 04:35:00 PM              3.26 %               

cpu.usage.average       04/06/2017 04:30:00 PM              2.92 %               

cpu.usage.average       04/06/2017 04:25:00 PM              3.29 %               

cpu.usage.average       04/06/2017 04:20:00 PM              3.19 %               

cpu.usage.average       04/06/2017 04:15:00 PM              3.02 %               

cpu.usage.average       04/06/2017 04:10:00 PM              3.14 %               

cpu.usage.average       04/06/2017 04:05:00 PM              3.19 %               

cpu.usage.average       04/06/2017 04:00:00 PM              2.97 %               

cpu.usage.average       04/06/2017 03:55:00 PM               3.3 %               

cpu.usage.average       04/06/2017 03:50:00 PM              3.46 %               

cpu.usage.average       04/06/2017 03:45:00 PM              3.07 %               

cpu.usage.average       04/06/2017 03:40:00 PM              3.24 %               

cpu.usage.average       04/06/2017 03:35:00 PM              3.32 %               

cpu.usage.average       04/06/2017 03:30:00 PM              3.08 %               

cpu.usage.average       04/06/2017 03:25:00 PM              3.29 %               

cpu.usage.average       04/06/2017 03:20:00 PM              3.23 %               

cpu.usage.average       04/06/2017 03:15:00 PM              3.16 %               

cpu.usage.average       04/06/2017 03:10:00 PM              3.34 %               

cpu.usage.average       04/06/2017 03:05:00 PM               3.4 %               

cpu.usage.average       04/06/2017 03:00:00 PM              3.07 %               

cpu.usage.average       04/06/2017 02:55:00 PM              3.29 %               

cpu.usage.average       04/06/2017 02:50:00 PM              3.52 %               

cpu.usage.average       04/06/2017 02:45:00 PM              2.99 %               

cpu.usage.average       04/06/2017 02:40:00 PM              3.16 %               

cpu.usage.average       04/06/2017 02:35:00 PM              3.22 %               

cpu.usage.average       04/06/2017 02:30:00 PM              2.89 %               

cpu.usage.average       04/06/2017 02:25:00 PM              3.27 %               

cpu.usage.average       04/06/2017 02:20:00 PM              3.23 %               

cpu.usage.average       04/06/2017 02:15:00 PM               3.1 %               

cpu.usage.average       04/06/2017 02:10:00 PM              3.24 %               

cpu.usage.average       04/06/2017 02:05:00 PM              3.33 %               

cpu.usage.average       04/06/2017 02:00:00 PM              3.01 %               

cpu.usage.average       04/06/2017 01:55:00 PM              3.31 %               

cpu.usage.average       04/06/2017 01:50:00 PM              3.49 %               

cpu.usage.average       04/06/2017 01:45:00 PM              3.13 %               

cpu.usage.average       04/06/2017 01:40:00 PM              3.21 %               

cpu.usage.average       04/06/2017 01:35:00 PM              3.26 %               

cpu.usage.average       04/06/2017 01:30:00 PM              2.96 %               

cpu.usage.average       04/06/2017 01:25:00 PM              3.22 %               

cpu.usage.average       04/06/2017 01:20:00 PM              3.85 %               

cpu.usage.average       04/06/2017 01:15:00 PM              3.03 %               

cpu.usage.average       04/06/2017 01:10:00 PM               3.2 %               

cpu.usage.average       04/06/2017 01:05:00 PM              3.25 %               

cpu.usage.average       04/06/2017 01:00:00 PM              2.98 %               

cpu.usage.average       04/06/2017 12:55:00 PM               3.3 %               

cpu.usage.average       04/06/2017 12:50:00 PM              3.69 %               

cpu.usage.average       04/06/2017 12:45:00 PM              3.06 %               

cpu.usage.average       04/06/2017 12:40:00 PM              3.16 %               

cpu.usage.average       04/06/2017 12:35:00 PM              3.33 %               

cpu.usage.average       04/06/2017 12:30:00 PM              2.99 %               

cpu.usage.average       04/06/2017 12:25:00 PM              3.22 %               

cpu.usage.average       04/06/2017 12:20:00 PM              3.21 %               

cpu.usage.average       04/06/2017 12:15:00 PM              2.99 %               

cpu.usage.average       04/06/2017 12:10:00 PM              3.15 %               

cpu.usage.average       04/06/2017 12:05:00 PM              3.21 %               

cpu.usage.average       04/06/2017 12:00:00 PM              2.94 %               

cpu.usage.average       04/06/2017 11:55:00 AM              3.31 %               

cpu.usage.average       04/06/2017 11:50:00 AM              3.87 %               

cpu.usage.average       04/06/2017 11:45:00 AM              3.07 %               

cpu.usage.average       04/06/2017 11:40:00 AM              3.12 %               

cpu.usage.average       04/06/2017 11:35:00 AM              3.27 %               

cpu.usage.average       04/06/2017 11:30:00 AM              2.96 %               

cpu.usage.average       04/06/2017 11:25:00 AM              3.22 %               

cpu.usage.average       04/06/2017 11:20:00 AM              3.19 %               

cpu.usage.average       04/06/2017 11:15:00 AM              3.13 %               

cpu.usage.average       04/06/2017 11:10:00 AM              5.27 %               

cpu.usage.average       04/06/2017 11:05:00 AM              3.32 %               

cpu.usage.average       04/06/2017 11:00:00 AM              3.07 %               

PowerCLI C:\> Get-Stat -Entity (Get-VMHost host1) -Stat cpu.usage.average -IntervalMins 5 | where{$_.instance -eq ""}

MetricId                Timestamp                          Value Unit     Instance

--------                ---------                          ----- ----     --------

cpu.usage.average       05/06/2017 11:20:00 AM              4.68 %               

cpu.usage.average       05/06/2017 11:15:00 AM              4.75 %               

cpu.usage.average       05/06/2017 11:10:00 AM              5.12 %               

cpu.usage.average       05/06/2017 11:05:00 AM              4.91 %               

cpu.usage.average       05/06/2017 11:00:00 AM              4.58 %               

cpu.usage.average       05/06/2017 10:55:00 AM              4.83 %               

cpu.usage.average       05/06/2017 10:50:00 AM              5.06 %               

cpu.usage.average       05/06/2017 10:45:00 AM              4.82 %               

cpu.usage.average       05/06/2017 10:40:00 AM              4.76 %               

cpu.usage.average       05/06/2017 10:35:00 AM              4.56 %               

cpu.usage.average       05/06/2017 10:30:00 AM              4.31 %               

cpu.usage.average       05/06/2017 10:25:00 AM              4.66 %               

cpu.usage.average       05/06/2017 10:20:00 AM              4.66 %               

cpu.usage.average       05/06/2017 10:15:00 AM              4.78 %               

cpu.usage.average       05/06/2017 10:10:00 AM              5.29 %               

cpu.usage.average       05/06/2017 10:05:00 AM              4.75 %               

cpu.usage.average       05/06/2017 10:00:00 AM              4.51 %               

cpu.usage.average       05/06/2017 09:55:00 AM              4.87 %               

cpu.usage.average       05/06/2017 09:50:00 AM              4.83 %               

cpu.usage.average       05/06/2017 09:45:00 AM              4.69 %               

cpu.usage.average       05/06/2017 09:40:00 AM              4.61 %               

cpu.usage.average       05/06/2017 09:35:00 AM              4.63 %               

cpu.usage.average       05/06/2017 09:30:00 AM              4.33 %               

cpu.usage.average       05/06/2017 09:25:00 AM              4.66 %               

cpu.usage.average       05/06/2017 09:20:00 AM              4.65 %               

cpu.usage.average       05/06/2017 09:15:00 AM              4.66 %               

cpu.usage.average       05/06/2017 09:10:00 AM              5.15 %               

cpu.usage.average       05/06/2017 09:05:00 AM              4.75 %               

cpu.usage.average       05/06/2017 09:00:00 AM              4.42 %               

cpu.usage.average       05/06/2017 08:55:00 AM              4.74 %               

cpu.usage.average       05/06/2017 08:50:00 AM              4.73 %               

cpu.usage.average       05/06/2017 08:45:00 AM              4.71 %               

cpu.usage.average       05/06/2017 08:40:00 AM              4.62 %               

cpu.usage.average       05/06/2017 08:35:00 AM              4.62 %               

cpu.usage.average       05/06/2017 08:30:00 AM              4.34 %               

cpu.usage.average       05/06/2017 08:25:00 AM              4.67 %               

cpu.usage.average       05/06/2017 08:20:00 AM               4.5 %               

cpu.usage.average       05/06/2017 08:15:00 AM              4.65 %               

cpu.usage.average       05/06/2017 08:10:00 AM              5.25 %               

cpu.usage.average       05/06/2017 08:05:00 AM              4.77 %               

cpu.usage.average       05/06/2017 08:00:00 AM              4.68 %               

cpu.usage.average       05/06/2017 07:55:00 AM              4.87 %               

cpu.usage.average       05/06/2017 07:50:00 AM               4.8 %               

cpu.usage.average       05/06/2017 07:45:00 AM              4.71 %               

cpu.usage.average       05/06/2017 07:40:00 AM              4.72 %               

cpu.usage.average       05/06/2017 07:35:00 AM              4.63 %               

cpu.usage.average       05/06/2017 07:30:00 AM              4.39 %               

cpu.usage.average       05/06/2017 07:25:00 AM               4.5 %               

cpu.usage.average       05/06/2017 07:20:00 AM              4.36 %               

cpu.usage.average       05/06/2017 07:15:00 AM              4.56 %               

cpu.usage.average       05/06/2017 07:10:00 AM              5.14 %               

cpu.usage.average       05/06/2017 07:05:00 AM              4.89 %               

cpu.usage.average       05/06/2017 07:00:00 AM              4.47 %               

cpu.usage.average       05/06/2017 06:55:00 AM              4.71 %               

cpu.usage.average       05/06/2017 06:50:00 AM              5.06 %               

cpu.usage.average       05/06/2017 06:45:00 AM              4.67 %               

cpu.usage.average       05/06/2017 06:40:00 AM              4.47 %               

cpu.usage.average       05/06/2017 06:35:00 AM              4.88 %               

cpu.usage.average       05/06/2017 06:30:00 AM              4.23 %               

cpu.usage.average       05/06/2017 06:25:00 AM              4.36 %               

cpu.usage.average       05/06/2017 06:20:00 AM              4.37 %               

cpu.usage.average       05/06/2017 06:15:00 AM              4.44 %               

cpu.usage.average       05/06/2017 06:10:00 AM               4.9 %               

cpu.usage.average       05/06/2017 06:05:00 AM               4.4 %               

cpu.usage.average       05/06/2017 06:00:00 AM              4.68 %               

cpu.usage.average       05/06/2017 05:55:00 AM              4.79 %               

cpu.usage.average       05/06/2017 05:50:00 AM              4.93 %               

cpu.usage.average       05/06/2017 05:45:00 AM              4.75 %               

cpu.usage.average       05/06/2017 05:40:00 AM              4.56 %               

cpu.usage.average       05/06/2017 05:35:00 AM              4.95 %               

cpu.usage.average       05/06/2017 05:30:00 AM              4.44 %               

cpu.usage.average       05/06/2017 05:25:00 AM              4.65 %               

cpu.usage.average       05/06/2017 05:20:00 AM              4.63 %               

cpu.usage.average       05/06/2017 05:15:00 AM              4.88 %               

cpu.usage.average       05/06/2017 05:10:00 AM              5.16 %               

cpu.usage.average       05/06/2017 05:05:00 AM              4.71 %               

cpu.usage.average       05/06/2017 05:00:00 AM              4.57 %               

cpu.usage.average       05/06/2017 04:55:00 AM              4.84 %               

cpu.usage.average       05/06/2017 04:50:00 AM              6.61 %               

cpu.usage.average       05/06/2017 04:45:00 AM              4.96 %               

cpu.usage.average       05/06/2017 04:40:00 AM              4.68 %               

cpu.usage.average       05/06/2017 04:35:00 AM               5.1 %               

cpu.usage.average       05/06/2017 04:30:00 AM              4.39 %               

cpu.usage.average       05/06/2017 04:25:00 AM              4.79 %               

cpu.usage.average       05/06/2017 04:20:00 AM              4.64 %               

cpu.usage.average       05/06/2017 04:15:00 AM              4.86 %               

cpu.usage.average       05/06/2017 04:10:00 AM              4.66 %               

cpu.usage.average       05/06/2017 04:05:00 AM              5.39 %               

cpu.usage.average       05/06/2017 04:00:00 AM              4.46 %               

cpu.usage.average       05/06/2017 03:55:00 AM              4.92 %               

cpu.usage.average       05/06/2017 03:50:00 AM              5.11 %               

cpu.usage.average       05/06/2017 03:45:00 AM              4.84 %               

cpu.usage.average       05/06/2017 03:40:00 AM               4.6 %               

cpu.usage.average       05/06/2017 03:35:00 AM              4.99 %               

cpu.usage.average       05/06/2017 03:30:00 AM               4.5 %               

cpu.usage.average       05/06/2017 03:25:00 AM              4.87 %               

cpu.usage.average       05/06/2017 03:20:00 AM               4.7 %               

cpu.usage.average       05/06/2017 03:15:00 AM              4.77 %               

cpu.usage.average       05/06/2017 03:10:00 AM              4.68 %               

cpu.usage.average       05/06/2017 03:05:00 AM              5.39 %               

cpu.usage.average       05/06/2017 03:00:00 AM              4.53 %               

cpu.usage.average       05/06/2017 02:55:00 AM              4.88 %               

cpu.usage.average       05/06/2017 02:50:00 AM              5.11 %               

cpu.usage.average       05/06/2017 02:45:00 AM              4.82 %               

cpu.usage.average       05/06/2017 02:40:00 AM              4.74 %               

cpu.usage.average       05/06/2017 02:35:00 AM              4.82 %               

cpu.usage.average       05/06/2017 02:30:00 AM              4.61 %               

cpu.usage.average       05/06/2017 02:25:00 AM              4.79 %               

cpu.usage.average       05/06/2017 02:20:00 AM              4.73 %               

cpu.usage.average       05/06/2017 02:15:00 AM              4.67 %               

cpu.usage.average       05/06/2017 02:10:00 AM              4.66 %               

cpu.usage.average       05/06/2017 02:05:00 AM              5.33 %               

cpu.usage.average       05/06/2017 02:00:00 AM              4.41 %               

cpu.usage.average       05/06/2017 01:55:00 AM              4.88 %               

cpu.usage.average       05/06/2017 01:50:00 AM              5.06 %               

cpu.usage.average       05/06/2017 01:45:00 AM              4.88 %               

cpu.usage.average       05/06/2017 01:40:00 AM              4.72 %               

cpu.usage.average       05/06/2017 01:35:00 AM              4.81 %               

cpu.usage.average       05/06/2017 01:30:00 AM              4.75 %               

cpu.usage.average       05/06/2017 01:25:00 AM              4.78 %               

cpu.usage.average       05/06/2017 01:20:00 AM              4.58 %               

cpu.usage.average       05/06/2017 01:15:00 AM              4.72 %               

cpu.usage.average       05/06/2017 01:10:00 AM              4.67 %               

cpu.usage.average       05/06/2017 01:05:00 AM              5.49 %               

cpu.usage.average       05/06/2017 01:00:00 AM              4.55 %               

cpu.usage.average       05/06/2017 12:55:00 AM              5.98 %               

cpu.usage.average       05/06/2017 12:50:00 AM              5.04 %               

cpu.usage.average       05/06/2017 12:45:00 AM              4.68 %               

cpu.usage.average       05/06/2017 12:40:00 AM              4.51 %               

cpu.usage.average       05/06/2017 12:35:00 AM              4.55 %               

cpu.usage.average       05/06/2017 12:30:00 AM              4.33 %               

cpu.usage.average       05/06/2017 12:25:00 AM              4.48 %               

cpu.usage.average       05/06/2017 12:20:00 AM              4.41 %               

cpu.usage.average       05/06/2017 12:15:00 AM              4.62 %               

cpu.usage.average       05/06/2017 12:10:00 AM              4.52 %               

cpu.usage.average       05/06/2017 12:05:00 AM              5.14 %               

cpu.usage.average       05/06/2017 12:00:00 AM              4.37 %               

cpu.usage.average       04/06/2017 11:55:00 PM              4.72 %               

cpu.usage.average       04/06/2017 11:50:00 PM              5.12 %               

cpu.usage.average       04/06/2017 11:45:00 PM              4.82 %               

cpu.usage.average       04/06/2017 11:40:00 PM              4.67 %               

cpu.usage.average       04/06/2017 11:35:00 PM              4.83 %               

cpu.usage.average       04/06/2017 11:30:00 PM              4.76 %               

cpu.usage.average       04/06/2017 11:25:00 PM              4.98 %               

cpu.usage.average       04/06/2017 11:20:00 PM              4.81 %               

cpu.usage.average       04/06/2017 11:15:00 PM               4.8 %               

cpu.usage.average       04/06/2017 11:10:00 PM              4.72 %               

cpu.usage.average       04/06/2017 11:05:00 PM              5.49 %               

cpu.usage.average       04/06/2017 11:00:00 PM              4.55 %               

cpu.usage.average       04/06/2017 10:55:00 PM              5.06 %               

cpu.usage.average       04/06/2017 10:50:00 PM              5.23 %               

cpu.usage.average       04/06/2017 10:45:00 PM              4.89 %               

cpu.usage.average       04/06/2017 10:40:00 PM              4.72 %               

cpu.usage.average       04/06/2017 10:35:00 PM              4.86 %               

cpu.usage.average       04/06/2017 10:30:00 PM              4.74 %               

cpu.usage.average       04/06/2017 10:25:00 PM              5.05 %               

cpu.usage.average       04/06/2017 10:20:00 PM              4.74 %               

cpu.usage.average       04/06/2017 10:15:00 PM              4.83 %               

cpu.usage.average       04/06/2017 10:10:00 PM              4.82 %               

cpu.usage.average       04/06/2017 10:05:00 PM               5.5 %               

cpu.usage.average       04/06/2017 10:00:00 PM               4.6 %               

cpu.usage.average       04/06/2017 09:55:00 PM              4.95 %               

cpu.usage.average       04/06/2017 09:50:00 PM              5.32 %               

cpu.usage.average       04/06/2017 09:45:00 PM              5.24 %               

cpu.usage.average       04/06/2017 09:40:00 PM              4.82 %               

cpu.usage.average       04/06/2017 09:35:00 PM              4.99 %               

cpu.usage.average       04/06/2017 09:30:00 PM              4.58 %               

cpu.usage.average       04/06/2017 09:25:00 PM              4.99 %               

cpu.usage.average       04/06/2017 09:20:00 PM               4.7 %               

cpu.usage.average       04/06/2017 09:15:00 PM              4.79 %               

cpu.usage.average       04/06/2017 09:10:00 PM              4.71 %               

cpu.usage.average       04/06/2017 09:05:00 PM               4.9 %               

cpu.usage.average       04/06/2017 09:00:00 PM              5.05 %               

cpu.usage.average       04/06/2017 08:55:00 PM              5.01 %               

cpu.usage.average       04/06/2017 08:50:00 PM              6.35 %               

cpu.usage.average       04/06/2017 08:45:00 PM              4.75 %               

cpu.usage.average       04/06/2017 08:40:00 PM              4.62 %               

cpu.usage.average       04/06/2017 08:35:00 PM              4.92 %               

cpu.usage.average       04/06/2017 08:30:00 PM              4.65 %               

cpu.usage.average       04/06/2017 08:25:00 PM              4.89 %               

cpu.usage.average       04/06/2017 08:20:00 PM              4.73 %               

cpu.usage.average       04/06/2017 08:15:00 PM              4.67 %               

cpu.usage.average       04/06/2017 08:10:00 PM              4.87 %               

cpu.usage.average       04/06/2017 08:05:00 PM              4.95 %               

cpu.usage.average       04/06/2017 08:00:00 PM              5.26 %               

cpu.usage.average       04/06/2017 07:55:00 PM              4.97 %               

cpu.usage.average       04/06/2017 07:50:00 PM               5.4 %               

cpu.usage.average       04/06/2017 07:45:00 PM              4.73 %               

cpu.usage.average       04/06/2017 07:40:00 PM              5.02 %               

cpu.usage.average       04/06/2017 07:35:00 PM               4.9 %               

cpu.usage.average       04/06/2017 07:30:00 PM              4.64 %               

cpu.usage.average       04/06/2017 07:25:00 PM              4.95 %               

cpu.usage.average       04/06/2017 07:20:00 PM               4.8 %               

cpu.usage.average       04/06/2017 07:15:00 PM              4.71 %               

cpu.usage.average       04/06/2017 07:10:00 PM              4.89 %               

cpu.usage.average       04/06/2017 07:05:00 PM              5.09 %               

cpu.usage.average       04/06/2017 07:00:00 PM              5.21 %               

cpu.usage.average       04/06/2017 06:55:00 PM              4.98 %               

cpu.usage.average       04/06/2017 06:50:00 PM              5.51 %               

cpu.usage.average       04/06/2017 06:45:00 PM              4.78 %               

cpu.usage.average       04/06/2017 06:40:00 PM              4.88 %               

cpu.usage.average       04/06/2017 06:35:00 PM              4.87 %               

cpu.usage.average       04/06/2017 06:30:00 PM              4.57 %               

cpu.usage.average       04/06/2017 06:25:00 PM              4.85 %               

cpu.usage.average       04/06/2017 06:20:00 PM              5.11 %               

cpu.usage.average       04/06/2017 06:15:00 PM              4.77 %               

cpu.usage.average       04/06/2017 06:10:00 PM              4.94 %               

cpu.usage.average       04/06/2017 06:05:00 PM              5.01 %               

cpu.usage.average       04/06/2017 06:00:00 PM              5.08 %               

cpu.usage.average       04/06/2017 05:55:00 PM              4.99 %               

cpu.usage.average       04/06/2017 05:50:00 PM               5.7 %               

cpu.usage.average       04/06/2017 05:45:00 PM              4.73 %               

cpu.usage.average       04/06/2017 05:40:00 PM               4.8 %               

cpu.usage.average       04/06/2017 05:35:00 PM              4.79 %               

cpu.usage.average       04/06/2017 05:30:00 PM              4.64 %               

cpu.usage.average       04/06/2017 05:25:00 PM                 5 %               

cpu.usage.average       04/06/2017 05:20:00 PM              4.82 %               

cpu.usage.average       04/06/2017 05:15:00 PM              4.65 %               

cpu.usage.average       04/06/2017 05:10:00 PM              4.98 %               

cpu.usage.average       04/06/2017 05:05:00 PM              5.12 %               

cpu.usage.average       04/06/2017 05:00:00 PM              5.05 %               

cpu.usage.average       04/06/2017 04:55:00 PM              4.92 %               

cpu.usage.average       04/06/2017 04:50:00 PM              5.13 %               

cpu.usage.average       04/06/2017 04:45:00 PM              4.59 %               

cpu.usage.average       04/06/2017 04:40:00 PM              4.73 %               

cpu.usage.average       04/06/2017 04:35:00 PM              4.79 %               

cpu.usage.average       04/06/2017 04:30:00 PM              4.46 %               

cpu.usage.average       04/06/2017 04:25:00 PM              4.82 %               

cpu.usage.average       04/06/2017 04:20:00 PM              4.75 %               

cpu.usage.average       04/06/2017 04:15:00 PM              4.61 %               

cpu.usage.average       04/06/2017 04:10:00 PM              4.76 %               

cpu.usage.average       04/06/2017 04:05:00 PM              4.81 %               

cpu.usage.average       04/06/2017 04:00:00 PM              5.14 %               

cpu.usage.average       04/06/2017 03:55:00 PM              4.97 %               

cpu.usage.average       04/06/2017 03:50:00 PM               5.2 %               

cpu.usage.average       04/06/2017 03:45:00 PM              4.78 %               

cpu.usage.average       04/06/2017 03:40:00 PM              4.89 %               

cpu.usage.average       04/06/2017 03:35:00 PM               4.8 %               

cpu.usage.average       04/06/2017 03:30:00 PM              4.63 %               

cpu.usage.average       04/06/2017 03:25:00 PM              4.86 %               

cpu.usage.average       04/06/2017 03:20:00 PM               4.8 %               

cpu.usage.average       04/06/2017 03:15:00 PM              4.77 %               

cpu.usage.average       04/06/2017 03:10:00 PM                 5 %               

cpu.usage.average       04/06/2017 03:05:00 PM              5.05 %               

cpu.usage.average       04/06/2017 03:00:00 PM              5.15 %               

cpu.usage.average       04/06/2017 02:55:00 PM              4.94 %               

cpu.usage.average       04/06/2017 02:50:00 PM              5.28 %               

cpu.usage.average       04/06/2017 02:45:00 PM              4.68 %               

cpu.usage.average       04/06/2017 02:40:00 PM              4.77 %               

cpu.usage.average       04/06/2017 02:35:00 PM              4.73 %               

cpu.usage.average       04/06/2017 02:30:00 PM              4.38 %               

cpu.usage.average       04/06/2017 02:25:00 PM              4.89 %               

cpu.usage.average       04/06/2017 02:20:00 PM              4.71 %               

cpu.usage.average       04/06/2017 02:15:00 PM              4.79 %               

cpu.usage.average       04/06/2017 02:10:00 PM              4.91 %               

cpu.usage.average       04/06/2017 02:05:00 PM              4.99 %               

cpu.usage.average       04/06/2017 02:00:00 PM              4.61 %               

cpu.usage.average       04/06/2017 01:55:00 PM              5.35 %               

cpu.usage.average       04/06/2017 01:50:00 PM              5.12 %               

cpu.usage.average       04/06/2017 01:45:00 PM              4.86 %               

cpu.usage.average       04/06/2017 01:40:00 PM              4.81 %               

cpu.usage.average       04/06/2017 01:35:00 PM              4.73 %               

cpu.usage.average       04/06/2017 01:30:00 PM              4.46 %               

cpu.usage.average       04/06/2017 01:25:00 PM               4.8 %               

cpu.usage.average       04/06/2017 01:20:00 PM              5.34 %               

cpu.usage.average       04/06/2017 01:15:00 PM              4.71 %               

cpu.usage.average       04/06/2017 01:10:00 PM              5.01 %               

cpu.usage.average       04/06/2017 01:05:00 PM              4.94 %               

cpu.usage.average       04/06/2017 01:00:00 PM              4.55 %               

cpu.usage.average       04/06/2017 12:55:00 PM              5.53 %               

cpu.usage.average       04/06/2017 12:50:00 PM              5.37 %               

cpu.usage.average       04/06/2017 12:45:00 PM              4.76 %               

cpu.usage.average       04/06/2017 12:40:00 PM              4.78 %               

cpu.usage.average       04/06/2017 12:35:00 PM              4.81 %               

cpu.usage.average       04/06/2017 12:30:00 PM              4.54 %               

cpu.usage.average       04/06/2017 12:25:00 PM              4.78 %               

cpu.usage.average       04/06/2017 12:20:00 PM              4.84 %               

cpu.usage.average       04/06/2017 12:15:00 PM              4.64 %               

cpu.usage.average       04/06/2017 12:10:00 PM              4.96 %               

cpu.usage.average       04/06/2017 12:05:00 PM              4.85 %               

cpu.usage.average       04/06/2017 12:00:00 PM              4.46 %               

cpu.usage.average       04/06/2017 11:55:00 AM              5.54 %               

cpu.usage.average       04/06/2017 11:50:00 AM              5.54 %               

cpu.usage.average       04/06/2017 11:45:00 AM              5.99 %               

cpu.usage.average       04/06/2017 11:40:00 AM              4.82 %               

cpu.usage.average       04/06/2017 11:35:00 AM              4.79 %               

cpu.usage.average       04/06/2017 11:30:00 AM              4.57 %

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

It looks like aggregation on the vCenter is not activated or working (which the lack of returned output from Get-StatInterval seems to confirm).

When you only provide the IntervalMins parameter you should be getting metrics for the last day with 5 minute intervals in your case.

Btw, there is no need to use a Where-clause, there is an Instance parameter.

Get-Stat -Entity (Get-VMHost HOSTNAME) -Stat cpu.usage.average -IntervalMins 5 -Instance ""

On your second question, the fact that you only get 1 hour of data seems to confirm the vCenter aggregation is not working.

The 1 hour data, with the 20 second interval, is the so-called Realtime data, which comes directly from the ESXi node.

Have a look at  PowerCLI & VSphere Statistics – Part 1 – The Basics for more info on this.

Btw, the latest PowerCLI version is 6.5.1, not 6.5R1!


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
proseti
Enthusiast
Enthusiast
Jump to solution

Firstly, thanks for response guys.
Tell me plz if I understood right.
According to this https://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp#com.vmware.vsphere.bsa.doc_40/vc_admin_guide...  "statistics Level" = 1 will not save mem.usage.average or cpu.usage.average more than in 20secs intervals in 1hour overall? To save more logs (more than 1hour overall) should I change "statistics level" on lvl 2 or higher?

"Virtual Machine Operations – numChangeDS, numChangeHost, numChangeHostDS" on lvl 1 says that these are ONLY stats of VMs witch I can get on that lvl?

and
"Virtual Machine Operations – All metrics"  on lvl 2 will show me all stats in more than 1hour back?

      
I've been wondering why I can get stats from more than 1 hour back on Hosts but I can't on VMs placed on that hosts. Second thought - VMs stats from more than 1 hour back are shown in vCenter in VMs performance graphs...

W8inf for your help guys :-))

LucD
Leadership
Leadership
Jump to solution

The required statistics levels are to be found under the PerformanceManager entry in the API Reference.
Let's take the cpu.usage.average entry.

cpu-usage.png

The average is available with Statistics Level 1, the minimum and maximum require Statistics Level 4.

Since you see the Historical Intervals in the vSPhere Client, it could be that you are connected to the ESXi node, and not the vCenter.

When connected to an ESXi node, you get 1 hour of metrics with a 20 seconds interval.

Check what is in $global:defaultviserver.

Is that the vCenter?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
proseti
Enthusiast
Enthusiast
Jump to solution

Thanks for advices faultless LucD !

It was true - when I were connected to the host and listing cpu.average.usage I get only 1hour back info, when I asked from vcenter level I get more, older stats :-)).
Thanks again and see ya in future topics !

Reply
0 Kudos