Windows Performance Monitor (Perfmon) Tip

Posted in: Technical Track

Have you ever used Perfmon to collect performance statistics about a particular Windows Server? Do you hate manually picking the counters out of the list? Do you trace basically the same counters every time?

If you answered “yes” to any of these questions, here’s a tip that can save you some time. Once you’ve created and saved a trace, you can save/export it as an HTML document. When you need to trace a new server, with a few quick Find/Replaces from your favorite text editor, you can be up and tracing in minutes on the new host, without using the interface to pick and choose each of your counter objects.

Here’s how to do create a Perfmon trace template:

  1. If you already have a saved trace somewhere, open perfmon on that server, expand Performance Logs and Alerts and click on Counter Logs. If you don’t already have a saved trace, you’ll have to create one before getting started.
  2. From the Performance Logs and Alerts screen, right-click on your trace and click on Save Settings As…
  3. Save the file somewhere and give it a meaningful name. (The default location is My Documents.)
  4. Copy the file somewhere onto your machine for later use.

Congratulations. You’ve created and saved a template. It’s that easy. Now let’s say you’re ready to use it somewhere else.

  1. Open the file with your favorite text editor and have a look. You’ll notice that there are some lines that look something like this:
    PARAM NAME="Counter00001.Path" VALUE="\\SomeServerName\Memory\Available MBytes"

    Use Find/Replace to change “SomeServerName” to the name of the host you’re planning use it on.

  2. Save the file.
  3. Copy it to the host you’re planning to monitor and open Perfmon.
  4. Navigate back to “Counter Logs” and right click in the right window. You should have the New Log Settings From... Click it.
  5. Navigate to the file you just copied onto the server and click Open.
  6. You’ll be prompted for a name. Give your trace a meaningful name and click ok.

That’s it. You’ve imported your trace template. If your previous template had a schedule set up, you’ll need to edit the schedule before you can use the new trace.

If you’d like to tweak it a little bit (add this, remove that), you can now edit it through the interface. If you had a lot of counters to add and you really dislike the interface, you could edit the HTML file directly before importing it.




Want to talk with an expert? Schedule a call with our team to get the conversation started.

About the Author

Chris Presley loves order—making him a premier Microsoft SQL Server expert. Not only has he programmed and administered SQL Server, but he has also shared his expertise and passion with budding DBAs as SQL Server instructor at Conestoga College in Kitchener, Ontario. Drawing on his strong disaster-recovery skills, he monitors production environments to swiftly detect and resolve problems before they arise. A self-described adrenaline junkie, Chris likes tackling the biggest database problems and putting out the toughest fires—and hitting the road on his motorcycle.

6 Comments. Leave new

Good stuff. I was looking for this feature from sometime back. Now I found it. Thanks so much for the information.


This is what I’ve been looking for.

Thanks alot!!!


Once you get the Perfmon data collected, then the hard part starts. Look at SmartMon ( to analyze the Perfmon data you collect.


Another way to handle using the same file for multiple machines is to remove the “\\SomeServerName” from the counters altogetherin the .htm file. This just causes the machine to default to local host. Great article.


This was a great guidance and saved me hours! Thank you so much.


Do you know if possible to in turn publish this via IIS and turn this into a web page there by turning it to a web based monitoring solution? … would be great to give developers etc a bit more real time view of some perfomance info. say of database servers that they otherwise dont have access.


Leave a Reply

Your email address will not be published. Required fields are marked *