Monday, June 25, 2012

Perfmon File Format Fun

One of the things that I really like about esxtop, is that the batch mode output file can be loaded into windows performance monitor aka perfmon.  There are some things about the way that perfmon allows you to quickly select different counter sets and zoom in on specific time segments of data that make it the best tool to use in some cases.

I recently found myself working with some other data that was in a plain text format, but would be nice to have in a CSV format.  I also decided that it would be nice if it would load into perfmon as well, just to make things really nice.

It turns out that perfmon won't accept just any old CSV file, but is expecting a very specific format.  I used some esxtop output files as examples and then was able to construct the key elements needed to create a CSV file that will load into windows perfmon.  I could not find this information anywhere else, so I thought that I would share it here for anybody who is interested.

All values must be separated by commas.

All values must be enclosed by double quotes.

The very first value on the first line is the format definition.  I just copied the one used by esxtop.

The first line of values defines how the counters will be displayed and oraganized for selection in perfmon.  It follows this format \\<hostname>\<GroupCounterName>(<CounterName>)\<DataValueName>

The first line must have the same number of values as the number of columns (in other words - each column of data must have a label).

The first column for each row after the first row is the date / time stamp.  It must be of the format MM/DD/YYYY HH:MM:SS

Here is a sample from a CSV file that I created following these rules that does load successfully into perfmon:

Here is what it looks like when you add this CSV file as a source in perfmon and then go to add data counters:

So now you know the secrets to the file format needed for CSV files to work with windows perfmon.  Have fun.


No comments: