Saving perfmon templates in Windows Server 2008 [R2], Vista and 7
August 3, 2010
posted by James Kehr
Managed Windows Server Performance Tip
Here is a great tip for someone looking to review some performance information on their managed Windows dedicated server or Windows Cloud server. Also, don't forget that included in our Complete Care Managed Services (CCMS) is enhanced monitoring and even personal system and data reviews by your Microsoft Certified support team.
There is a slight change in the way perfmon (the lovingly short way of saying Windows Performance Monitor) templates work once you leave the XP/2003 domain. In the old days Microsoft likes to put everything in these hard to dissect, custom bin files that you couldn't easily, or at all, modify without the aid of the Microsoft application. Luckily they are leaving that model behind for one that is open and easy for administrators to automate with. Enter the XML Dragon.
Perfmon in Windows Server 2008 [R2], Vista and 7 now uses easy to edit XML templates to store custom made templates. To change the template simply edit the document in your XML editor of choice, mine is UltraEdit, then create a new data collection set with your custom template.
I'm not going to re-invent the wheel here, so if you are not familiar with creating manual/custom data collector sets, or perfmon in general, please check out this very detailed TechNet article: http://technet.microsoft.com/en-us/library/cc749249.aspx. Once you are done creating your set simply right-click on the set and select Save Template... from the menu. Now it's time for a beautiful snippet with a wonderfully drawn red arrow pointing out the location on the menu, for those visual learners among us.

My art skills are awesome, I know.
As you save the template you may noticed the file type is a simple old .XML file. As long as you don't mess with the structure you can edit the XML data to your heart's content.
In one scenario, load testing a six node webfarm with two SQL servers, I was able to setup all eight data collector sets in just a few minutes by creating a master template, making a copy for each server, opening the XML in UltraEdit (Notepad works well too), and using the replace text tool to change the server name. Save and create a new data collector set from a template for each server and done. I even wrote a few PowerShell lines start and stop the collectors.
$collectors = "DataCollectorSet01","DataCollectorSet02","DataCollectorSet03", ... (and so on until all the data collector set names are listed)
To mass start the collectors:
foreach ($collector in $collectors) {logman start $collector}
To mass stop:
foreach ($collector in $collectors) {logman stop $collector}
Easy as can be. Drop me a comment if you have any questions.
To find out more about our solutions, check out the links below our contact us at sales@orcsweb.com.
Managed Windows Dedicated Server Hosting
Managed Windows Cloud Server Hosting
Managed Shared Windows Hosting












