Disappearing Perfmon Counters
Posted on Mar, 2009 by Admin
I had a strange issue on my machine today. I opened up Perfmon and there were no counters available to add for my localhost machine, or my machine by name. After some research on the topic I found this web site:
In short, I was missing two files called perfc009.dat and perfh009.dat. I had to restore the two files from the XP install CD and place them into my %Systemroot%\System32\ directory. I launched Perfmon and everything was fine again. So what are these two files and how do they go missing?
These are part of the base set of performance counter libraries in Windows XP. The compressed files are found at DriveLetter:\i386\perfc009.da_ and at DriveLetter:\i386\perfh009.da_. In my case, it was probably due to a registry and “garbage” cleaning program that I used, but these can also become corrupted by 3rd party tool using Windows Managment Instrumentation (WMI) to gather information about your system during run-time. Sometimes these can corrupt the registry or the files themselves. So it is good to know how to restore these files back to your System32 directory. You can also find a Microsoft Knowledge Base article on how to rebuild performance counters here:
http://support.microsoft.com/kb/300956
One thing to keep in mind is that if Perfmon is broken like this, it will mean that LoadRunner will not be able to monitor the machine either, since it uses an API to Perfmon to gather those metrics. When your Windows monitors stop working on a particular machine, the first thing to do would be to launch Perfmon on that machine and ensure that works. This will tell you immediately if it is a LoadRunner problem. Most of the time it isn’t. It is usually a permissions issue where the account you are trying to use to get monitors from a machine is not correct, but more infrequently, you could have a machine with this issue I described above.