I have to write a maintenance script that iterates over our IPs testing their connectivity to certain services such as
nc -sip# mailin-01.mx.aol.com 25.
It has a flag
-w ... but it's not what I think it is. That is, I only want this program to run for at max 3 seconds and the places we are connecting to are always up (unless major network problems that the script shouldn't worry about --- not its particular job and would be noticed before the script is run).
I just need it to connect and see if we are getting an error message. This is required before we assign an IP to a user for their web page (this is an alternative to CPanel stuff -- we want our own).