Updated September 04, 2003
Created September 04, 2003


Autogenerated Site Map
Search this Site!:
Search this site powered by FreeFind

Short, sweet, and simple. Is that service up? (complete with timestamps):

Let's see if smtp (25) is up. Just change 25 to 21 for ftp, 80 for http, etc. etc.:

COUNT=30; while :; do if [ $((COUNT++)) -ge 10 ]; then echo -ne "\n`date "+%H:%M:%S"` - "; COUNT=1; fi; nc -w 1 -z server.domain.com 25 && echo -ne '.' || echo -ne 'F'; sleep 1; done

Some like to read the above broken onto several lines, so here it is expanded:
COUNT=30
while :; do
	if [ $((COUNT++)) -ge 10 ]; then
		echo -ne "\n`date "+%H:%M:%S"` - "
		COUNT=1
	fi
	nc -w 1 -z server.domain.com 25 && echo -ne '.' || echo -ne 'F'
	sleep 1
done
Here's a sample of the output:
17:36:40 - .......F..
17:36:51 - .....F....
17:37:03 - ...

Search this Site!:
Search this site powered by FreeFind

Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html