My big goal is: to write an shell script that would detect hung NFS mount.
My approach: from within my main program, call a sub program that reads/write from/to directories on the nfs mount. If the sub program doesn't come back after a certain amount of time, kill the sub program and proceed with assumption that the mount is hung.
My question: I dont know linux shell scripting very well, could someone help me with this: specifically, how to call the sub-program with that timeout option? (assuming that nfs mount directory is known)
Env: bash shell.