in reply to Re: How to monitor an NFS mount with perl
in thread How to monitor an NFS mount with perl

Make sure that the filesystem was mounted with the intr option (or soft,intr depending on the OS; consult your local sysadmin and/or mount(8) manpage), otherwise the open(2) system call will get stuck in system wait and won't return until the NFS server's responding again alarm or no.

  • Comment on Re^2: How to monitor an NFS mount with perl

Replies are listed 'Best First'.
Re^3: How to monitor an NFS mount with perl
by bluto (Curate) on Feb 08, 2005 at 18:43 UTC
    This will probably work, but I've seen systems that don't respond if you wait too long to interrupt the process.

    One of the problems with hard NFS mounts is that anything you do underneath the mount point will cause a hang if the server is unavailable and sometimes not even a SIGKILL can get rid of the process. One way to handle this might be to fork a child process, which performs the check and quits. As long as the child doesn't exit you know the mount point is down.