[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: Using conserver with vmware

Ryan Kirkpatrick linux@rkirkpat.net
Wed, 7 Dec 2011 15:00:05 GMT

On Tue, 6 Dec 2011, Joe Greco wrote:

> Like to the conserver box.  So my obvious first attempt was to use netcat,
> using "nc -l <port>" like so: ...
> And this works... at first.  But if there's a console that's NOT up, say
> because the VM is down, our system is designed to restart conserver every
> night when it rotates logs, and "nc -l <port>" processes start to stack up,
> because nc doesn't stop waiting for an incoming connection just because its
> stdin has vanished.  Foo.

You might want to take a look at the -q option to netcat:

-q seconds   after EOF on stdin, wait the specified number of seconds and
then quit. If seconds is negative, wait forever.

I have never used netcat with conserver, but I have used it to listen for
incoming connection in other circumstances. Without that -q option, netcat
hangs even after the "client" has gone away. Guess netcat is waiting for
the next client, but you don't always want that. TTYL.

| "For to me to live is Christ, and to die is gain." --- Phil. 1:21 (KJV) |
| Ryan Kirkpatrick | Boulder, CO | rkirkpat.net | twitter.com/rkirkpatnet |