CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2007
    Location
    Denmark
    Posts
    623

    [RESOLVED] where does performancecounter not work?

    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?
    It's not a bug, it's a feature!

  2. #2
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: where does performancecounter not work?

    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.
    Last edited by MMH; November 21st, 2008 at 05:14 AM.
    Regards,
    MMH
    Rate my post if you find it usefull.

  3. #3
    Join Date
    May 2007
    Location
    Denmark
    Posts
    623

    Re: where does performancecounter not work?

    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.
    It's not a bug, it's a feature!

  4. #4
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: where does performancecounter not work?

    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.

  5. #5
    Join Date
    May 2007
    Location
    Denmark
    Posts
    623

    Re: where does performancecounter not work?

    Quote Originally Posted by foamy View Post
    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
    It states that the command "diskperf –yv" must be executed before logical and physical disk counters are enabled...
    Last edited by foamy; November 21st, 2008 at 08:07 AM. Reason: Found solution
    It's not a bug, it's a feature!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured