Command line stats
Jed Reynolds
lists at benrey.is-a-geek.net
Fri Feb 9 00:48:49 UTC 2007
Steven Grimm wrote:
> The problem here is not that echo sends the command early (after all,
> it will just sit in nc's input buffer until nc is ready to read it) or
> a bug in memcached, but rather that nc exits as soon as it gets
> end-of-file on its standard input, before it has had a chance to read
> memcached's response.
>
> echo -e "stats\nquit" | nc -w1 memcached-host 11211
>
> works fine. That tells nc to wait (1 second) for input before exiting.
>
> -Steve
I'm running a late 1.2.0 (one from cvs right before 1.2.1 was labeled
IIRC) and even if I do a "nc -w10 $ip" I only get a report once in a
while. Sometimes I get the response, "ERROR".
I have much better response from "nc -i1 -w1 $ip" or even just "nc -i1 $ip".
Jed
More information about the memcached
mailing list