Re: Monitoring for a hung NFS mount?

2008-04-02 Thread Augie Schwer
I hear Jim's going to release the nfscheck.monitor he wrote into the mon-contrib tree which is the same basic logic as what I wrote, but implemented in a far cleaner way. On the topic of NFS; the next step would be to do a compare between mtab and fstab and alert if everything you thought was

Re: Monitoring for a hung NFS mount?

2008-04-02 Thread Ed Ravin
On Wed, Apr 02, 2008 at 10:49:00AM -0700, Augie Schwer wrote: On the topic of NFS; the next step would be to do a compare between mtab and fstab and alert if everything you thought was mounted actually wasn't; seems pretty trivial, but anyone already have something written up? No, but

Re: Monitoring for a hung NFS mount?

2008-04-02 Thread Augie Schwer
On Wed, Apr 2, 2008 at 11:19 AM, Ed Ravin [EMAIL PROTECTED] wrote: On Wed, Apr 02, 2008 at 10:49:00AM -0700, Augie Schwer wrote: On the topic of NFS; the next step would be to do a compare between mtab and fstab and alert if everything you thought was mounted actually wasn't; seems

Re: Monitoring for a hung NFS mount?

2008-04-01 Thread Augie Schwer
Thanks everyone who replied (privately and on the list); attached is what I finally went with; it works well, doesn't stack procs. for hung mounts and works great using the snmpvar monitor. --Augie On Thu, Mar 27, 2008 at 3:27 PM, Augie Schwer [EMAIL PROTECTED] wrote: Anyone have a good way to

Re: Monitoring for a hung NFS mount?

2008-03-28 Thread Augie Schwer
On Fri, Mar 28, 2008 at 8:17 AM, Jeff Price [EMAIL PROTECTED] wrote: can you cat a file on the mounted directory and maybe do a checksum on it? If you can't open the file consider it hung. I am not suire of a direct way to get at the NFS, maybe the NFS control port is unavaila when it

Re: Monitoring for a hung NFS mount?

2008-03-28 Thread Andrew Ryan
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

Re: Monitoring for a hung NFS mount?

2008-03-28 Thread Augie Schwer
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.

Re: Monitoring for a hung NFS mount?

2008-03-28 Thread Andrew Ryan
Yeah, a plain fork/alarm isn't going to help you here because it's going to block waiting on the IO from the hung mount. A low tech way around this would be instead of forking, to exec off your stat process, and have it write/touch some file marker somewhere after it finishes the stat. The only

Re: Monitoring for a hung NFS mount?

2008-03-28 Thread Michael Alan Dorman
On Fri, 28 Mar 2008 11:00:54 -0700 (PDT) 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.