Enabling process performance counters

L

Lucvdv

I'm stuck with a VS.Net application that crashes because the process
performance counters aren't enabled. The GetProcessesByName method
(System.Diagnostics.Process) seems to need them.

Everything that looks like it's necessary seemed to be in my target
already (Base Performance Counters, which includes perfproc.dll, and
Performace Counter Configuration), but the counters aren't working.
Does anyone know how to enable them?
 
L

Lucvdv

I'm stuck with a VS.Net application that crashes because the process
performance counters aren't enabled.

This event log entry may be related, although it's the wrong
performance object: PerfOS includes processor, memory etc., and
PerfProc are the process counters.

| Performance counter data collection from the "PerfOS" service has been
| disabled due to one or more errors generated by the performance
| counter library for that service. The error(s) that forced this
| action have been written to the application event log.

[ Ehh no - they have not. ]

| The error(s) should be corrected before the performance counters for
| this service are enabled again.
 
L

Lucvdv

I'm stuck with a VS.Net application that crashes because the process
performance counters aren't enabled. The GetProcessesByName method
(System.Diagnostics.Process) seems to need them.

Everything that looks like it's necessary seemed to be in my target
already (Base Performance Counters, which includes perfproc.dll, and
Performace Counter Configuration), but the counters aren't working.
Does anyone know how to enable them?

I added Performance Monitor to the configuration.

In PM the process counters work, but the .Net CLR still says
"System.InvalidOperationException: Process performance counter is
disabled, so the requested operation cannot be performed."

This happens even after I've been looking at them in PM in the same
session.

Does anyone have some insight to share?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top