Here's the problem. I had a linux box (A), and a sun box (B). They
are both connected to a 100mb switched private lan. They are the
only boxen on this network. I have complete control over A, but none
over B. I need to be able to write a program to run on A that will
detect as fast as possible if B is up or down. Calling ping or any
other external programs is out of the question - too much overhead.
This might have to be done many times a second. My initial idea was
to open a tcp connection to a port i know is closed on B, thereby
getting a REJECT, and confirming it's up. This solution takes on
average 509 usecs to say yay, and times out after 500 msecs
(configurable) to say nay.
Now it's been suggested that I try some facny tcp half-connect
modes, or maybe even arp. However, networks aren't my speciality. I
was wondering if anyone had any suggestions/comments.
P.s. I know that this is not strictly a linux question, but this is a
linux _users_ list, and i'm doing this using linux.
"My mom had Windows at work and it hurt her eyes real bad"
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!