Perfmon /sys – a little gem in Perfmon

Introduction

When you are testing designs, validating implementations or giving demos Performance Monitor is your friend. It pays to spend a little time to learn about it in order to use it better and be more productive.

The tool is not perfect and it has its (annoying) idiosyncrasies like any other tool. It also has its little gems. Overall it is a very useful tool for Windows systems engineer at any experience level.

Standard behavior of perfmon

One of the “annoying” things about perfmon is that by default it does not save a configuration. Every time you close it you have to rebuild perfmon to show the desired counters, set the correct scale, colors, background etc. This can be time consuming and is rather annoying when you are giving demos as you need a long time to prepare your perfmon environment. It becomes outright frustrating during testing. You might find you need to remove and add counters over and over again. This is due to the fact that very often, after changing settings the counters for an object, the counters stop working. Reconfiguring network settings are a prime example of this.

Default Perfmom behavior: your configuration and counter settings are not persisted

The default behavior of Performance Monitor gives you the option to define Data collector sets and open reports next to to adding performance counters and customizing your settings. But all the work you have done in regards to the configuration and visualization of the counters are gone after you close Performance Monitor.

There is a good way to avoid this frustration. Use Perfmon /sys from the command line.

Benefits of Perfmon /sys

Persistence under your Windows user profile

When you run perfmon /sys it will remember the configuration and the counters. The first use case of this just to make sure the default counters you like to see are always there. And as it remembers the configuration the layout, colors, scaling, background are also there. That’s a big improvement over the default.

Perfmon /Sys behavior: you changes are persisted to your Windows user profile

As these settings are persisted under your windows user profile. That’s nice but what if I want to have preconfigured perfmon configurations available on multiple systems or you want to share them with colleagues or customers?

Persistence to a file

The good news is that you can persist your favorite Perfmon configurations to a file. That means that you can create a collection of them for various use cases and scenarios. You can share these between users and systems.

Save your Perfmon /sys settings to files for resuse, sharing and portability

I hope it goes without saying that the ability to share is dependent on the counters you use. When you have Mellanox RDMA cards in some servers and not in another that won’t work. But other than that, it is all pretty straight forward.

When you’re testing you also tend to disable and enable devices such as network or Fibre Channel cards. Some 3rd party counters tend to survive such operations but both the inbox native counters and 3rd party counters do not. The counters stop working. You end up having to remove the counters and add them again just to get ‘m working again. As said, when you do a lot of testing this becomes a drag. Closing a your perfmon down and opening your PerfmonCfg file make it all a lot more convenient and faster. I know it saves me a ton of time.

The histogram idiosyncrasy

A small idiosyncrasy exists when opening a PerfmonCfg of a persisted histogram layout. Opening a report or a line layout you saved works very well. When you save and open a histogram layout it opens the layout as line. The histogram option is shown as selected in the file menu and configuration but not visualized. All your settings are persisted, it is only a cosmetic issue. The workaround is to switch to another layout and back to histogram after which it correctly. It’s been around for a long time and it seems it might never get fixed.

Conclusion

Fore demonstration and test purposes, running perfmon /sys is a time saver. The settings are persisted in your user profile. By saving these setting to a PerfmonCfg file your customized Perfmon settings becomes portable.  You can add it to your presentation files to open quickly manually or via a demo script. Whether you’ll use this during demo’s, POCs, verification of an installation … it’s a great way to quickly show predefined reports of real time data. This has been of very much help to during presentations and testing. I hope you find it useful as well. No, I am convinced you will, just give it a try!

Didier Van Hoye
 

My name is Didier Van Hoye, better known as WorkingHardInIT on twitter. I’m IT pro that has been at “IT” for over 20 years. I’m convinced you cannot design what you cannot build and vice versa. So while I’m an “Architect” I’m still in the trenches with my boys and gals. Empty suits or hollow bunnies are neither wanted nor needed. In IT you live by the sword and you die by the sword. There is no hiding when you mess up, all our mistakes are in plain sight of everyone using what we build.