Click to See Complete Forum and Search --> : [RESOLVED] where does performancecounter not work?


foamy
November 20th, 2008, 09:30 AM
Hi,

I have a windows service installed on a bunch of different servers. It uses a performancecounter to find out different things about the server's status (harddrive space, available memory and so on)...

I've recently discovered that this does not work on certain windows 2000 servers.
Specifically, I have isolated two Windows 2000 servers.
They are both running Windows version 5.00.2195 SP4 with WMI version 1.50.1085.0100...
On one of the servers I get the error "Category does not exist" when trying to run a counter on the LogicalDisk category.

What difference between these two servers would cause such an error?

MMH
November 21st, 2008, 04:09 AM
If you ever happen to look at the very bottom of MSDN, then you could see the list of supported platforms by the .Net Framework under the section "Platforms".

All the supported platforms are listed along with the required service packs.

It also says,

The .NET Framework and .NET Compact Framework do not support all versions of every platform.


I hope this is the very cause of it.

Also, you can check/compare your system configuration and conclude thereafter. There may be some other configuration issues might as well.

foamy
November 21st, 2008, 04:20 AM
Thanks for the reply :)

as far as I can tell, the PerformanceCounter class is supported by all versions of the .NET framework. The server that produces the error has version 2.0 installed. This is why I looked up the WMI version - I think the problem is outside of the framework.

MMH
November 21st, 2008, 04:23 AM
Sorry, but i don't mean by .Net Framework.
I mean check your platform (OS, version, SP installed, etc) and compare it with those on which it is working.

foamy
November 21st, 2008, 04:55 AM
Specifically, I have isolated two Windows 2000 servers.
They are both running Windows version 5.00.2195 SP4 with WMI version 1.50.1085.0100...

That's my question... I'm asking if anyone knows of some other differences that could come into play between these two servers. As in: "What should I look for?"

EDIT: Just found this (http://www.microsoft.com/technet/prodtechnol/exchange/guides/ExMgmtGuide/d145e28c-4740-473b-b335-0d221994f685.mspx?mfr=true)
It states that the command "diskperf –yv" must be executed before logical and physical disk counters are enabled...