I am trying to detect when a host has recovered from a reboot by executing:
ping -c 1 -W 1800 myhost
I was hoping that before 30 mins passes the host would successfully ping and in my script I could take some action like
ssh to the host. But the host DOES boot up before the 30 mins past, which I can verify by manually running
ping myhost from the command line, but the
ping -c 1 -W 1800 myhost does not succeed. It just times out.
My OS is:
$ uname -a Linux dev-001 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 15 17:36:42 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux