lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Sep 2007 11:35:25 -0400
From:	Chris Snook <csnook@...hat.com>
To:	Yishai Hadas <Yishai.Hadas@...ddin.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: Health monitor of a multi-threaded process

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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ