提交 bbaeda40 编写于 作者: A antirez

Added a qbuf-free field to CLIENT LIST output.

上级 e74dca73
...@@ -1111,7 +1111,7 @@ sds getClientInfoString(redisClient *client) { ...@@ -1111,7 +1111,7 @@ sds getClientInfoString(redisClient *client) {
if (emask & AE_WRITABLE) *p++ = 'w'; if (emask & AE_WRITABLE) *p++ = 'w';
*p = '\0'; *p = '\0';
return sdscatprintf(sdsempty(), 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, ip,port,client->fd,
(long)(now - client->ctime), (long)(now - client->ctime),
(long)(now - client->lastinteraction), (long)(now - client->lastinteraction),
...@@ -1120,6 +1120,7 @@ sds getClientInfoString(redisClient *client) { ...@@ -1120,6 +1120,7 @@ sds getClientInfoString(redisClient *client) {
(int) dictSize(client->pubsub_channels), (int) dictSize(client->pubsub_channels),
(int) listLength(client->pubsub_patterns), (int) listLength(client->pubsub_patterns),
(unsigned long) sdslen(client->querybuf), (unsigned long) sdslen(client->querybuf),
(unsigned long) sdsavail(client->querybuf),
(unsigned long) client->bufpos, (unsigned long) client->bufpos,
(unsigned long) listLength(client->reply), (unsigned long) listLength(client->reply),
getClientOutputBufferMemoryUsage(client), getClientOutputBufferMemoryUsage(client),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册