Re: Testing remote machine status in a script ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



2009/10/25 Niki Kovacs <contact@xxxxxxxxxxxxx>:
> IF remote machine is switched on / connected to the network...

Use ping and test the result; perhaps something similar to this:

 case `ping -qnc 1 10.0.0.2 2>&1` in
   *'100% packet loss'*)
        exit 1
        ;;
 esac

See the script at the bottom of
http://www.digitalpeer.com/id/configuringa for more info.

Ben
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux