18

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.

Screenshot

Geeklet files to download

Comments

User Avatar
nedkelly 420 days ago
How can you do more than one address?

Log in to comment or register here.