Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Check server status remotely with a perl script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Check server status remotely with a perl script
Authored by: foilpan on Mar 01, '06 11:00:42AM

i didn't interpret the previous post with any sort of hostility or "programmer's laziness," as you did.

since i'm not that familiar with netcat's usage, it took a minute or two of quick man page reading to see what it does. that's not so bad.

for instance, i just issued a <code>nc -vz 192.168.1.1 1-80</code> to scan the open ports on our main server here in the office (that's not the internal IP, but you get the idea). it works like a charm, showing which ports are open. If you try with a host that's down, it will report as such. neat-o.

i've used nmap to test for hosts' status, too.



[ Reply to This | # ]
Check server status remotely with a perl script
Authored by: rschwarz on Mar 01, '06 12:17:01PM
Thank you foilpan for your additional information on the usage of nc. Although I looked up the man page, it was not instantly clear to me, that this can be done so easily.

You can also set the timeout with the -w option. This is useful to me, since I don't want to wait a minute or so until netcat aborts.

[ Reply to This | # ]