Finding out which performance counters are available on your vSphere server over which time interval, is not always an easy task. There is of course the Performance Manager entry in the VMware vSphere API Reference, but that is not always the easiest task. Let alone finding out what a specific counter actually represents.
For that reason I decided to create a tool, which I called the Stats Toolbox, that would query the vSphere server to get the actual list of counters it collects for each interval. In the tool I added some extra features that would make working with the performance counters easier.
Stats Toolbox Overview
The Stats Toolbox is a PowerShell/PowerCLI script that uses a GUI to interact with the user. The form that is presented has several regions.
This is where you connect to a vSphere server. That can be a vCenter or an ESXi server. The names of the servers are saved in an INI file in the current directory.
When a connection is established, the type and version of the vSphere server will be displayed.
There are 5 possible intervals. The Realtime interval is available on an ESXi server, it captures all the counters and it buffers approximately 1 hour of performance data. This is, by default, the only available interval on an ESXi server. When you connect to an ESXi server, the Historical Intervals are not available.
The Historical Intervals, 1 till 4, are available on a vCenter server. The counters in these intervals are created by the aggregation jobs that run on the vCenter database at regular intervals. The available counters in each of these intervals are determined by the Statistics Level that is defined for each Historical Interval.
You can find more information on these intervals in my PowerCLI & vSphere statistics – Part 1 – The basics post.
The table lists all available counters for a specific interval and for a specific counter group. The counter group “<All>” will display all counters.
Note that in the Historical Intervals there is a distinction between the regular, or aggregate, level and the device level. The regular level will return an average over all the individual devices. For example, the average over CPU0, CPU1, CPU2 and CPU3. The device level returns the counter per device. In the same example, there would be a counter for CPU0 and CPU1 and CPU2 and CPU3.
The entities list shows all inventory items on the connected vSphere Server for which performance data is available. The Search option accepts Regular Expressions. For example, the search string “^test” will return all inventory items that start with “test”.
There are a number of tools available for the counters and for the entities. A short overview.
Allows one to change the regular or device level for a specific counter or counters. Watch out, this might increase the size of your vCenter database !
The button will open your default browser, and start a Google search with the selected counter. You can fine-tune the search, by limiting the results to the VMTN communities or to the PowerCLI community.
This will return for the selected entity/entities the oldest available performance data.
The script will generate a Get-Stat script that uses the selected counter(s) and entity/entities. The generated code is available in the clipboard.
A short demo
During the VMworld 2014 US session we showed the following demo. It runs through all the available features in the Stats Toolbox.
After you download the script, make sure to “Unblock” it.
This is a first public version of the Stats Toolbox. If you encounter any issues, please let me know. And feel free to suggest features to add to the Stats Toolbox.