Mostrando entradas con la etiqueta Ping. Mostrar todas las entradas
Mostrando entradas con la etiqueta Ping. Mostrar todas las entradas

Ping a varios hosts.

d
Visto en The Linux Tips
#!/bin/bash
for i in 192.168.0.{1..10}
do
   ping -c 1 -t 1 "$i" >/dev/null 2>&1 &&
   echo "Ping Status of $i : Success" ||
   echo "Ping Status of $i : Failed"
done
Leer más...

CheckHostAlive.bash

d
Nombre: CheckHostAlive.bash
Autor: @Tonejito
Descripción: Script que permite verificar si un host se encuentra arriba en la red,muestra un "0" si está arriba y un "1" si está abajo
Visto en: Tonejito
#!/bin/sh


# Check all hosts within the network
# BSD license


PING=/sbin/ping
SEQ=gseq


NET=192.168.2
ME=192.168.0.2


i=1;
while [ $i -le 254 ] ;
do
  $PING -v -D -s 8 -t 1 -w 1 -c 1 -I $ME $NET.$i 1>/dev/null
  printf "$?"
  i=`expr $i + 1` ;
done


printf "\n"
Permisos: chmod 700 CheckHostAlive.bash 
Ejecución: ./CheckHostAlive.bash.
Nota: El script mandará el ping del primer nódo al último [ 0-254 ]
Leer más...