[root@sukhoi tmp]# cat pingall.sh
#!/bin/bash
# Script to check the ping to multiple nodes
# Version 1.1
# date 29-10-2024
date
cat /tmp/nodes.txt | while read output
do
ping -c 1 "$output" > /dev/null
if [ $? -eq 0 ]; then
echo "node $output is up"
else
echo "node $output is down"
fi
done
No comments:
Post a Comment