This daemon then sets up a TCP connection to the server and portname provided. It then just sits there. If the connection breaks or if it is impossible to setup the connection, it will retry after 10 seconds, indefinitely. No network bandwidth or CPU cycles are wasted. It opens this port and listens for any connections.
Every connection is logged and a reverse DNS lookup is being done.
Then, the name of the host is added to the file. If a connection drops, the hostname is removed from the file. This file can then be used as input for LAM-MPI or something. I only tested it on Red Hat Linux 6.2 though. If someone has a website to put it on, go ahead.