Component for process performance counters?

M

Mike Shafer

I've been trying to add all sorts of components over the past few
hours to get my process monitor program working on my Arcom board with
XPE w/ SP1. The purpose of the application is to monitor other
processes and, if any one of them fails, to bring it back to life.
It's a very simple program that is only around 30 lines long, and
works fine on my development machine. I added various components in
Target Designer (essentially anything with the word Performance in it)
including Performance Command Line Tools, Performance Counter
Configuration (this sounds like it!!), Performance Counter WMI
Provider, Performance Data Helper, Performance Logs and Alerts
Service, and Performance Monitor. Nothing seems to work!

I pasted the error below. Anyone have a solution to this one?
Thanks!



Unhandled Exception: System.InvalidOperationException: Process
performance count
er is disabled, so the requested operation cannot be performed.
at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib
library)
at System.Diagnostics.NtProcessManager.GetProcessInfos(String
machineName, Bo
olean isRemoteMachine)
at System.Diagnostics.ProcessManager.GetProcessInfos(String
machineName)
at System.Diagnostics.Process.GetProcesses(String machineName)
at System.Diagnostics.Process.GetProcesses()
at Telemetry.TelemetryMonitor.run()
at Telemetry.TelemetryMonitor..ctor()
at Telemetry.TelemetryMonitor.Main(String[] args)

C:\>
 
B

Bing.Chen

Dear Mike,

I am not sure that this solution is suitable to your problem.

In XPE, if you want to use performance monitor, you must set pagefile.

You can try to set min page size = 2 MB, and max page size = 2 MB.



Best Regards,
Bing Chen
2004.06.04
 
S

Slobodan Brcin \(eMVP\)

Hi Mike,

I don't want to break your fun, but this kind of programs should be written in C/C++ or in some language that uses Win32 API
directly.

CreateProcess GetExitCodeProcess are the functions you need.
This program must be simple internally so you know what it uses and it must never hang.

Regards,
Slobodan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Tell Microsoft!
https://www.windowsembeddedeval.com/community/newsgroups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
M

Mike Shafer

Hey Bing,

I tried this but apparently get the same results. Any thoughts? I
can't think of what else to enable!

Unhandled Exception: System.InvalidOperationException: Process
performance count
er is disabled, so the requested operation cannot be performed.
at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib
library)
at System.Diagnostics.NtProcessManager.GetProcessInfos(String
machineName, Bo
olean isRemoteMachine)
at System.Diagnostics.ProcessManager.GetProcessInfos(String
machineName)
at System.Diagnostics.Process.GetProcesses(String machineName)
at System.Diagnostics.Process.GetProcesses()
at Telemetry.TelemetryMonitor.run()
at Telemetry.TelemetryMonitor..ctor()
at Telemetry.TelemetryMonitor.Main(String[] args)
 

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