Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 04-03-2009
Member
 
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
Reply With Quote
  #2  
Old 04-03-2009
Member
 
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.
Reply With Quote
  #3  
Old 04-03-2009
Member
 
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.
Reply With Quote
  #4  
Old 04-03-2009
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Enabling Process performance counter"
Thread Thread Starter Forum Replies Last Post
How to get good FPS and performance by enabling HPET in Windows 7 Nasir h Operating Systems 6 18-08-2012 03:59 PM
Performance data source module could not find a performance counter Hajra Operating Systems 3 27-06-2009 06:04 PM
Temperature/process affects the performance? Clauzii Overclocking & Computer Modification 4 09-05-2009 09:25 PM
Performance counter issue Franseza Windows XP Support 4 16-04-2007 06:56 AM


All times are GMT +5.5. The time now is 12:26 PM.