Messages in this thread |  | | | Subject | Health monitor of a multi-threaded process | | Date | Sun, 9 Sep 2007 12:31:47 +0300 | | From | "Yishai Hadas" <> |
| |
Hi List,
I'm looking for any mechanism in a multi-threaded process to monitor the health of its running threads - or by a specific monitor thread or by any other mechanism.
It includes the following aspects:
1) Threads are running and not stuck on any lock. 2) Threads are running and have not died accidentally. 3) Threads are not consuming "too much" CPU/Memory. 4) Threads are not in any infinite loop.
My questions:
1. Which kernel APIs can help here? 2. Which kernel APIs can supply CPU/Memory information on a given thread ID? 3. Is there any non-intrusive mechanism to achieve those goals?
I found that in kernel 2.6:
Reading the content of /proc/process_id/task_id/ can supply some information per running thread in a given process.
Is it a recommended way to go with? What about kernel 2.4 as this information doesn't exist per thread?
My questions relates to Kernel 2.4 and also to newer (e.g. 2.6) Kernel versions.
Any help will be appreciated. Thanks,
Yishai. ********************************************************************************************** The contents of this email and any attachments are confidential. It is intended for the named recipient(s) only. If you have received this email in error please notify the system manager or |  |