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.
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.
Once you get the Perfmon data collected, then the hard part starts. Look at SmartMon (www.perfmonanalysis.com) 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.