You can try to check the file which can be stored on he share - for example if the share is mounted on "/mnt/windows" then you can create hidden file "/mnt/windows/.monittest$" and use "check file ..." test. If the file won't exist, the share is not available.

Martin

Dave Keeton wrote:
I'm trying to wrap my head around the best way to monitor a remote SMB share that's mounted locally on a Linux box. Checking the directory doesn't appear to work, since the mount point will always be there. Any suggestions on how to verify that the mount is valid? I need to be able to have monit re-mount the share if it disappears for some reason. The SMB server is flaky, so it can be a hassle to get Linux to unmount the share and remount it when the connection is broken.

Thanks,
Dave


------------------------------------------------------------------------

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to