On Fri, Mar 28, 2008 at 11:00 AM, Andrew Ryan <[EMAIL PROTECTED]> wrote: > You'd probably need 2 processes ; one to drive and another process to go > off and stat the mount point. The driver would invoke the stat'ers, and > if the stat doesn't come back in some seconds, declare the mount hung. > Because if the mount really is hung, the stat process is going to hang > forever too, so you don't want your driver process to get hung too.
This is the path I went down, but the problem I ran into was that the forked child inherits process info., file descriptors, etc. from the parent and running my monitor remotely (ssh, or snmp) will hang the session as ssh or snmp waits for the inherited resources to be released from the child. Attached is where I got stuck; you can see I try and divorce the parent from the child as much as possible by closing all file handles, but when I run it via snmp (exec) it still hangs when I walk the tree; hanging on the STDOUT OID bit. I do get the correct return code though, so my next step is to try and just grab the return value OID and see if I can alert on that. Of course I still leave hung procs. around which is not really desirable. -- Augie Schwer - [EMAIL PROTECTED] - http://schwer.us Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE 2AC3 CB99 2784 27B0 C072
nfs_monitor.pl
Description: Perl program
_______________________________________________ mon mailing list mon@linux.kernel.org http://linux.kernel.org/mailman/listinfo/mon