0 Replies Latest reply on Jul 13, 2018 1:51 PM by jeremyg

    linux command not working the same through SAM as on the server

    jeremyg

      I am trying to run the following linux bash script to monitor when an NFS mount is inaccessible due to issues like a networking outage to the share.

       

       

       

      =======================

      read -t5 < <(stat -t "/<directory>" 2>&1)

      if [ $? -eq 0 ]; then

        echo "statistic: 0"

        echo "message: NFS Share is reachable"

      else

        echo "statistic: 1"

        echo "message: NFS Share hasn't responded in 30 seconds, please investigate"

      fi

      =======================

       

      this works great on the server, I blocked the outgoing IP to the share and it times out and give the statistic, but in SAM, it's as if it's disregarding the read timeout portion and just only attempts the stat part of it in which it just hangs until the template times out.  I'm not sure if there's a syntax change that I need to do or what.