Today I broke perfmon... :(
I can start the application, the three default counters (cpu, mem, disk) are there, but the graph won't move.
The Data Source is set to "Current Activity", the "Freeze Display" button is not pressed. I just rebooted, started perfmon, and no moving graph.
I tried restoring the counters using
C:\WINDOWS\system32>lodctr.exe /R
but that did not help.
Using Windows Server 2003 R2, 32bits. A collegue also got this problem on a similar environment, but we couldn't pinpoint the reason yet.
(For the downvoter(s): I know it's not directly programming related, but writing an app for performance without any measurements to go by with is a bit hard (but that might just be me)
To make this more interesting:
The following code also does not retrieve values:
System.Diagnostics.PerformanceCounter ctr =
new System.Diagnostics.PerformanceCounter();
ctr.CategoryName = "Processor";
ctr.CounterName = "% Processor Time";
ctr.InstanceName = "_Total";
ctr.MachineName = ".";
float val = ctr.NextValue().ToString();
// val equals 0
The image as requested:
alt text http://www.brokenwire.net/bw/file_download/23/perfmon.PNG
(So, the graph does not fill the screen, no values appear)
It sounds like you have been working on this pretty hard. Have you checked http://www.tomshardware.com/forum/117911-45-perfmon? Then you can double check your registry to make sure it is correct. Also, if you have your windows cd, you can copy over a fresh copy of the perfmon files.