title: Mounted samba share - how to check if it is online
body: <p>I need to check if mounted is online in script.
  and complete that check in maximum time of 1 second.</p>
  
  <p>I tried:</p>
  
  <ol>
  <li><p><code>smbclient -L -U user%pass</code> - but it takes too much time, and makes a trash in destination serwer logfile because of relogin</p></li>
  <li><p><code>stat /mnt/samba/file</code> - but it stucks when the samba share is offline</p></li>
  </ol>
  
  <p>Maybe one of You will help to find another way to complete that?</p>
  
  <p>Destination samba is using SMB3.0 protocole.</p>
  
  <p>Regards</p>