This script can take multiple servers at once but in order to see the status images I made each entry a new geeklet.

I was determined to have this on my desktop so I did it. The script does tend to time out so play with the TCP_TIMEOUT and see what works best for you.

Sorry that it's not the best. If you would like to make it better I'd love to have you share it with everyone here so we can all learn and move forward.

Thanks and I hope you all have a great day.

echo “www.somewebsite.com 8080” | ( TCP_TIMEOUT=3 while read host port; do r=$(bash -c 'exec 3<> /dev/tcp/'$host'/'$port';echo $?' 2>/dev/null) if [ "$r" = "0" ]; then echo "$host:$port is live" exit 0 else echo "$host:$port is closed" exit 1 # To force fail result in ShellScript fi done ) 2>/dev/null # avoid bash message "Terminated ..."

Geeklet files to download


Log in to comment or register here.