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:
- 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.
- From the Performance Logs and Alerts screen, right-click on your trace and click on Save Settings As…
- Save the file somewhere and give it a meaningful name. (The default location is My Documents.)
- 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.
- 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.
- Save the file.
- Copy it to the host you’re planning to monitor and open Perfmon.
- Navigate back to “Counter Logs” and right click in the right window. You should have the
New Log Settings From...Click it.
- Navigate to the file you just copied onto the server and click Open.
- 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.
Share this article
6 Responses to “Windows Performance Monitor (Perfmon) Tip”
Leave a Reply