Results 1 to 4 of 4

Thread: Enabling Process performance counter

  1. #1
    Join Date
    Feb 2009
    Posts
    84

    Enabling Process performance counter

    I recently update my Windows XP from SP2 to SP3; after the update my application generates the following error message:
    "Process Performance Counter is Disabled, so the requested operation cannot be performed."

    I have done the following but none helped:
    • Set the registry value of "Disable Performance Counters" to 0
    • Removed the registry entry "Disable Performance Counters"


    Can anyone guide me how do i Enable process performance

  2. #2
    Join Date
    Mar 2008
    Posts
    258

    Re: Enabling Process performance counter

    We had the same problem when trying to use the Process class to prevent multiple instances of our own application being launched and boy did it take us long to discover the problem as it occurred only on certain machines where the performance counters were disabled.

    We came up with a solution that works - unfortunately only for your testing for another instance of your own application and not for another application like you want to do. We basically used a named Mutex to signal between different instances of our application. The named mutex is a system object whose lifetime is bounded by the lifetimes of the Mutex objects
    that represent it. The named mutex would be created by the first instance of our application process. When the second SanQuote process comes along, it creates its mutex and waits for zero seconds for the first instance to signal that it is finished. Because the first instance is still running, this will
    not happen and the second instance therefore knows that there is already an instance of application running.

  3. #3
    Join Date
    Apr 2008
    Posts
    193

    Re: Enabling Process performance counter

    Points to consider:
    1. Performance information is not available to a non-admin account, which is not in the Performance Counter Users Group on Windows Server 2003. So the Process class could not get process performance information in this case.
    2. Getting performance data from all the processes on the machine is pretty expensive. The operating system (OS) might load lots of DLLs and it might take seconds to complete. The floppy drive light will be on when the OS tries to find the index for some performance counter.
    3. If the performance counter data was corrupted for any reason, the Process class could throw an exception while trying to convert some raw performance information into DateTime.
    4. The Process class could not be used to get process information on machines without the process performance counter. Performance counters can be disabled in Windows.

  4. #4
    Join Date
    Jan 2009
    Posts
    108

    Re: Enabling Process performance counter

    Looks like performance counters are disabled on your XP machine. Take a look at this message:
    http://groups-beta.google.com/group/...57806b555d33a8

    you should be able to turn on performance counters by editing the registry as mentioned in the last post of that conversation.

Similar Threads

  1. Replies: 6
    Last Post: 18-08-2012, 03:59 PM
  2. Replies: 3
    Last Post: 27-06-2009, 06:04 PM
  3. Temperature/process affects the performance?
    By Clauzii in forum Overclocking & Computer Modification
    Replies: 4
    Last Post: 09-05-2009, 09:25 PM
  4. Performance counter issue
    By Franseza in forum Windows XP Support
    Replies: 4
    Last Post: 16-04-2007, 06:56 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,613,407.98705 seconds with 17 queries