Solved

Monitor the threads created by windows application done in c#.

Posted on 2009-06-29
5
333 Views
Last Modified: 2013-12-17
Hi experts,

I want to monitor the threads created by windows application done in c#.
Since the project is big and i use lot of threads in my code, i want to
keep track of the threads created.

I need some idea like, i want to write the Thread name created ny application
in sequence, number of threads running and status of the thread.

All i need is Monitoring the threads and write them inside log file.
How to achive this???.
0
Comment
Question by:srk1982
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:elimesika
ID: 24734306
0
 

Author Comment

by:srk1982
ID: 24734408
Hi elimesika,

     I read that artilce already, but it is for monitoring all the processes in the system. Moreover i need to write the info of thread in a log file whenever there
are changes in the application threads

Thanks...
0
 
LVL 19

Expert Comment

by:elimesika
ID: 24735628
HI again

First , you can adapt  the sample to display just your process thread, the method receives a process Id ...

What do you mean by "whenever there are changes in the application threads"
do you mean that you will have to implement some kind of listener on the thread state change ??? or a solution that uses pooling to monitor thread state is OK???
0
 

Author Comment

by:srk1982
ID: 24742200
Yes elimesika, i want a Listener for monitoring the threads states, new threads created,
and threads disposed.

Thanks.
0
 
LVL 19

Accepted Solution

by:
elimesika earned 500 total points
ID: 24803270
Sorry for the delay (have lot of work to do)
Anyway

It seems that you will have to write a custom manager class and manage it by yourself.

I am loaded with work now, so , I will be able only to give advice

Good Luck
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question