andreisavu/zookeeper-monitoring — pull request #6 by maplebed (2013-12-03 19:25:31+00:00)
Title: read all the stat info, even when it exceeds 2048 bytes.

When the number of connected clients exceeds a small number, the client stats (example below) use up all 2048 bytes that are read off the socket. The result is that the actual metrics this script is looking for (latency etc.) are never read.

/10.32.73.187:43992[1](queued=0,recved=635,sent=635)
/10.158.12.47:60001[1](queued=0,recved=4208,sent=4208)
/10.82.237.49:35073[1](queued=0,recved=19,sent=19)
^^^^ these lines repeat and blow out the buffer, preventing it from reading vvvv
Latency min/avg/max: 0/3/299
Received: 2206216
Sent: 2276700