check mountpoint status and send email on timeout/failure?

biocyberman biocyberman at gmail.com
Mon Dec 11 10:50:17 UTC 2017


For someone using NFS or some other remote filesystems, one may 
have experienced many times the nasty silent hang. For example, 
if I run `ls /mnt/remote/nfsmount`, and the remote NFS server is 
down while /mnt/remote/nfsmount was mounted, it will take very 
long time or forever for the `ls` command to return an error. 
Imagine if it were not `ls` but a data producing program, or 
user's home directly, it will be very inconvenient. Since I want 
to learn D, I want to write a program that does:
1. Check a path and to see it is a mount point. If it is not a 
mount point, try to mount it, and send an email. If it is a mount 
point, go to step 2.
2. If it is amount point, but fails to response after a certain 
time period (e.g 5 seconds), then send an email.

I know nothing about how to write it in D, or which library to 
use. So, some help please.



More information about the Digitalmars-d-learn mailing list