srk1982
asked on
Monitor the threads created by windows application done in c#.
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???.
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???.
ASKER
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...
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...
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???
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???
ASKER
Yes elimesika, i want a Listener for monitoring the threads states, new threads created,
and threads disposed.
Thanks.
and threads disposed.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Follow this article code
http://www.codeproject.com/KB/dotnet/threadmonitor.aspx