Tuesday, October 5, 2010

Saving windows 2008 / windows 7 performance monitor settings

There are actually a few ways you can achieve this.  The first one is the one I find myself using the most, although the latter is really the way I was familiar with in previous OSes.  You can copy the properties of a given perfmon session by clicking on the Copy Properties icon ( copy) next to the highlight icon above the graph.  Next, open up Notepad and paste into it.  Save this file somewhere handy.  Next time you want to get back to the settings you were using, just open the file, copy all of the text in it, and click on the Paste Properties icon (image).  If you’re interested, here’s what the data looks like (click to enlarge):
Performance Monitor Properties
Another way you can save your settings it through Data Collector Sets.  Once you have one defined and have run it to completion, you’ll have Reports you can view.  You can copy and paste counters from one report to another.  So, if you define a Data Collector Set and add some performance counters to it, then run it, you’ll have some reports to look at.  You can look at any of these reports and simply highlight the counters you want, Copy, and then go back up to Performance Monitor (the live view) and Paste, and you’ll have the counters.  This is what I do now in practice, since the counters I want to watch are in user defined Data Collector Sets now already (so I can view a whole day or arbitrary period in a day after-the-fact). 
The third solution is to use the MMC.  Run mmc from Start-Run, then go to File – Add or Remove Snap-ins.  Add Performance to the selected snap-ins:
mmc - performance
Add whatever counters you want, then simply save it.  Back when I used to do this all the time I would have a perfmon.msc file on my server’s desktop that had the counters I was most interested in.
MMC-Save
Close the MMC and you should be able to open the saved .msc file by simply double-clicking on it.  This is exactly the behavior that I was used to on previous versions of Windows Server.  Apparently the change is that perfmon no longer launches the performance monitor tool inside an MMC instance, but rather as a standalone process (which doesn’t directly support Save).

No comments: