Performance measurement is a broad topic.
And you better read some of Scott Drummonds excellent articles in the Performance community on the subject.
Might I suggest Understanding VirtualCenter Performance Statistics as a starter.
To answer some of your questions:
- the Realtime parameter indicates you want get the performance data directly from the ESX server. The performance interval on ESX is currently 20 seconds. So a cpu.usage.average of 35% means that the CPU was used an average of 35% of those 20 seconds.
- the other, so called Historical intervals are calculated on the vCenter (based on the performance coming from the ESX server). vCenter knows 4 Historical Intervals. The interval times are 5 minutes, 30 minutes, 2 hours and 1 day.
- These Historical Intervals also define how long the performance data is kept. For example, the date for Historical Interval 1 (interval 5 mins) is kept for 1 day. Historical Interval 4 (interval 1 day) is kept for 1 year.
- the Intervalmins and Intervalsecs parameters do not replace the Start and Finish parameters.
- Start and Finish allow you to indicate between which 2 points in time you want to get the performance data
- Intervalmins and Intervalsecs allow you to specify over which interval the performance data should be calculated. Note that the Get-Stat cmdlet will return the closest of the available intervals. Remember these are 20 secs, 5 mins, 30 mins, 2 hours, 1 day.
- For example, you want a metric between 9 days and 6 days ago and you ask for Intervalsecs 300. Since the start of your requested interval is more than 1 week ago, the data will come from Historical Interval 3 which has an interval of 2 hours.
- If you want data of the last 5 hours you would specify -Start (Get-Date).AddHours(-5) and -Finish (Get-Date)
- If some Historical Intervals are not checked there will be no data available for that specific period in time.
- For example, if you uncheck Historical Interval 4, you will not be able to retrieve performance data older than 1 month.
- An important factor for the Historical Intervals is the statistics level. This level determines how many counters will be available for a specific Historical Interval
- To see all the available metric for a specific entity you can use the Get-StatType cmdlet or my Get-Stat2 script with the QueryMetrics parameter