Re: Health monitor of a multi-threaded process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yishai Hadas wrote:
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.

If you're using posix locking, you'll never find yourself busy-waiting for very long. Use ps or top.

2) Threads are running and have not died accidentally.

Use ps or top.

3) Threads are not consuming "too much" CPU/Memory.

Use ps or top.  You'll have to decide how much is "too much".

4) Threads are not in any infinite loop.

This requires solving the Halting Problem. If your management is demanding this feature, I suggest informing them that it is mathematically impossible.

Just use top or ps. Don't reinvent the wheel. We've got a really good wheel. If you don't like top or ps as is, read the ps man page to see all the fancy formatting it can do, and parse it with a simple script in your favorite scripting language.

	-- Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux