summaryrefslogtreecommitdiff
path: root/src/networking.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-03-13 13:26:33 +0100
committerantirez <antirez@gmail.com>2012-03-13 13:26:33 +0100
commitbbaeda402cac1b66b52a869bfc419001d79ffcc0 (patch)
tree93786d19ce5b9aa0c3d3ae928b84b50f18a680ba /src/networking.c
parente74dca73d9818b42e7ee34c0a686133813e8d3a3 (diff)
downloadredis-bbaeda402cac1b66b52a869bfc419001d79ffcc0.tar.gz
Added a qbuf-free field to CLIENT LIST output.
Diffstat (limited to 'src/networking.c')
-rw-r--r--src/networking.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c
index b0f450544..06097b586 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -1111,7 +1111,7 @@ sds getClientInfoString(redisClient *client) {
if (emask & AE_WRITABLE) *p++ = 'w';
*p = '\0';
return sdscatprintf(sdsempty(),
- "addr=%s:%d fd=%d age=%ld idle=%ld flags=%s db=%d sub=%d psub=%d qbuf=%lu obl=%lu oll=%lu omem=%lu events=%s cmd=%s",
+ "addr=%s:%d fd=%d age=%ld idle=%ld flags=%s db=%d sub=%d psub=%d qbuf=%lu qbuf-free=%lu obl=%lu oll=%lu omem=%lu events=%s cmd=%s",
ip,port,client->fd,
(long)(now - client->ctime),
(long)(now - client->lastinteraction),
@@ -1120,6 +1120,7 @@ sds getClientInfoString(redisClient *client) {
(int) dictSize(client->pubsub_channels),
(int) listLength(client->pubsub_patterns),
(unsigned long) sdslen(client->querybuf),
+ (unsigned long) sdsavail(client->querybuf),
(unsigned long) client->bufpos,
(unsigned long) listLength(client->reply),
getClientOutputBufferMemoryUsage(client),