Performance Series Part 2 – How to import an xml file into Perfmon on Windows.

Applies to: Windows 7+, Windows Server 2008 R2+
Target audience: People I support primarily. Anyone who wants to perf like a pro?

Why

There may come a time where you need to import an xml file given to you by a support person into Perfmon. This is so precise, targeted data captures can be made of the impacted system, or sometimes to baseline a system to know what good looks like.

What

The xml file is a template that defines the performance metrics to capture and also sometimes time intervals, file format for the results file, etc.

How

Step 1: Open Perfmon (start/perfmon or computer management/performance)

Step 2: Expand Performance and go to Data Collector Sets then User Defined.

Step 3:  Right Click the User Defined folder then select New > Data Collector Set.

Step 4: Give it a name and leave the “Create from a template” selected. Click Next.

Step 5: Click Browse and then select this file.

Step 6: Click through the wizard (next/next) and then select the top radio button “Open properties for this data collector set“.

Step 7: If you want to tweak anything about this collection, now is the time to do it. Most of the configuration has been done for you though. 200 MB rolling logs created in sequence with host name in the file name. This collects at a 1 second interval, to preserve space you can adjust to 5 or 10 seconds if you like. You do this by right clicking “Pal System Overview” under your data collector.

 

 

 

 

 

And then modifying the field you want to modify (in this example, Seconds)

 

 

 

 

 

 

 

 

 

Step 7: Once you are happy with the configuration, right click your data collector set and select Start.

 

Note this does not sustain through a restart/crash of Windows. To do that you need to follow this article: https://blogs.technet.microsoft.com/jeff_stokes/2011/11/16/how-to-sustain-your-data-collector-set-through-a-reboot/

Build a Perfmon data collector set from a PAL xml template

Howdy, simple walk-through post on how to build a Perfmon data collector set using the excellent templates available from Clint Huffman’s PAL utility.

Step 1: Export the appropriate template from PAL;

perfxml

One just clicks Threshold File (1), then Export to Perfmon template file (2), and gives it a file name to save as.

Step 2: Open Perfmon. Expand Data Collector Sets, User Defined, right-click, new – Data Collector Set. Give it a friendly name and hit next.

Step 3: click Browse, pick your XML file created in step 1. Click finish.

Step 4: Right click the new data collector set, properties. click on Stop Condition. Make it as so (200 MB limited file creation, restart at limit). Then click OK.

collectdata

Step 5: right click the PAL_System_Overview under your data collector set, properties, change sample interval to 5 seconds. Click File, set File name format to ddHHmmss and check Prefix file with computer name.

collectdata2

Click OK. right click and start the data collector set. Verify the files are being created in the Perflogs directory.

 

PAL 2.3 with Multi-Threading!

PAL (http://pal.codeplex.com/) is a favorite tool of mine, written by Clint Huffman.  I’ve written about it a few times but maybe you weren’t aware that the newest release has multi-threading capability?

It’s no in your face though really, just an option on the last page, the Execute page:

 

image

 

If you assign more than you have cores, your machine will be pretty unusable during the processing of a BLG, but it cuts time down significantly on complex traces.  Give it a shot!

Introducing Windows Server 2012 Free e-book available

I highly recommend giving this a read so you are ready for Windows Server 2012.  The dude had a hand in proofing the book and even has a sidebar on page 25 on performance monitoring.  Give it a read, rumor has it there may be some floating around at TechEd Orlando and Amsterdam as well…

PDF is homed on this page http://www.microsoft.com/en-us/server-cloud/new.aspx and the direct link is here:  http://go.microsoft.com/FWLink/?Linkid=251464

Enjoy!

Jeff

How to sustain your data collector set through a reboot!

This is a special post, from the Microsoft Premier Field Engineers (PFE) Vital Signs Instructors alias…something we felt should be shared.

EDIT 2016: Note that Clint Huffman made a post to do this in logman in a black box recorder stype. I recommend following that too if you need the functionality: Clint's world, party time, excellent

If you had noticed, it’s difficult to sustain a data collector set in Perfmon for 2008 R2 through a reboot, so it automatically starts after the reboot.  Well, here is how to make it work properly.

1. Define a User Defined Data Collector Set in Perfmon. You don’t have to define any schedule for it.

2. Go to Start -> Accessories -> System Tools -> Task Scheduler

3. Browse to Task Scheduler Library -> Microsoft -> Windows –> PLA

clip_image002

4. Enable Hidden Tasks (View ->  Show Hidden Tasks)

5. You should see all your User Defined Data Collector Sets in here.

6. Open your set, go to Triggers and set up “At Startup“ trigger

clip_image004

Hope this helps you with your performance data collection needs!

Special shout out to Martin Vokurek in Prague for developing the details on this!