This Geeklet displays the ping time to an address that you specify. If the connection fails, an error message is shown. It works for both computers on your network and web servers. Some examples are shown in the screenshot.
Command:
HOST=typehostnamehere
PING=`ping -q -c 1 $HOST`
if [[ $? -eq 0 ]] ; then
TIME=`echo $PING |tail -1 | cut -d/ -f 5`
echo ${TIME}ms away from $HOST
exit 0
else
echo $HOST could not be reached
exit 2
fi
You need to replace typehostnamehere with the address of the machine you want to ping.
