You are not logged in.

#1 2010-03-29 08:38:29

zZyXx
Member
Registered: 2008-06-26
Posts: 7

[solved] cli tool that repeatedly checks a host on a specified port

can anyone recommend a command line tool that repeatedly checks a host on a specified tcp port?

what i do now:
- I reboot a server
- I ping the host; when I see it replies, I know its networking is up
- I use "nmap -PN -p 25 host" from time to time to check when the smtp service comes up

I'm looking for a tool that does this port check repeatedly, like ping repeatedly checks for icmp echo replies...

Last edited by zZyXx (2010-03-29 13:56:30)

Offline

#2 2010-03-29 10:13:00

evol
Member
From: Ireland
Registered: 2007-06-27
Posts: 53
Website

Re: [solved] cli tool that repeatedly checks a host on a specified port

would "watch" suffice for your needs?

watch -n 60 nmap -PN -p 25 xx.xx.xx.xx

Where 60 is however many seconds you want to wait before repeating.


-//------------------/------>

Offline

#3 2010-03-29 12:10:57

zZyXx
Member
Registered: 2008-06-26
Posts: 7

Re: [solved] cli tool that repeatedly checks a host on a specified port

thanks. that should provide the desired functionality. I was looking for another tool because for some reason nmap takes a few seconds on this machine. I remembered reading about some tool that provided the functionality I described.
I found it again: it was nping, a new development related to nmap, still alpha however...
http://nmap.org/nping/

Offline

#4 2010-03-29 19:48:06

jamesbond007
Member
From: Germany
Registered: 2009-06-14
Posts: 150

Re: [solved] cli tool that repeatedly checks a host on a specified port

What about this?

watch netcat -vz -w 1 <ip> 25

Offline

Board footer

Powered by FluxBB