PowerCLI get-stat time range

During some stress tests on our platform we wanted to know more about the maximum and average network usage.

IMPORTANT before getting performance data: (same behavior for your VM’s!!!)
This can affect your outcome! (Always grab the information during the real-time period)

Real-time vs. Historical Data

Real-time Data
 The Real-time data is displayed for the last hour only and is directly queried from the ESX Host (vpxa) every 20 seconds.
Because the ESX Host stores the performance data locally for the last hour you can have a vCenter outage for up to one hour without getting any gaps in the historical data.

Historical Data
The process outlined below described the steps that are taking place to collect and store the Historical Data.

  1. Every 5 minutes 1/6th of the total amount of ESX Hosts (vpxa) is queried for performance data;
  2. The vpxa sends its data to vCenter (vpxd) which stores the data in the VPX_HIST_STAT1 table.

This process happens every 5 minutes which means that every ESX Host is queried once every 30 minutes.

To get these information you can use the command get-stat (https://www.vmware.com/support/developer/PowerCLI/PowerCLI41/html/Get-Stat.html). According to this info you can give a -start date and a -finish date in days…!!

And we wanted to know the network usage for approximately one hour. Otherwise the result would not be representative.

This will give you a better overview of the specific time.

Almost there, remember what we want to know: maximum and average network usage.
So we ended up with this line of code

The result will look like this.


About the Author


No Comments

Comments are closed.