0

I have create a windows service having multiple threads (approx 4-5 threads). In this service thread created at specific internal and abort. Once thread is created it performs some I/O operations & db operation.

I have a GUI for this service to provide configuration which is required by this service. In this GUI I want to add one more functionality which shows me the performance of windows service with respect to all threads. I want show CPU utilization (if multicore processor is available than all the processors utilization) with its memory utilization.

If you look at Windows Task Manager it shows CPU (Per core basis) + Memory Utilization, I want to build the same thing but only for threads running by my windows service.

Can anybody help me out how to get CPU% and memory utilization per thread?

Manish
  • 103
  • 3
  • 18

1 Answers1

0

I think you cannot get the CPU and Memory utilization of Threads. Instead you can get the same for your service.

My question is, why would you require to build your own functionality, where SysInternals Process explorer gives more details for you? Any specific needs?

If you need to monitor the thread activities, you could better log some information using Log4net or other logging tools. This will get you an idea about the threads and what they are doing.

To be more specific, you could publish the logs using TelNetAppender, which can be received by your application. This will help you to look into the Process in real time.

Rajan Panneer Selvam
  • 1,279
  • 10
  • 24