Details
-
Improvement
-
Resolution: Won't Fix
-
Major
-
1.6.5.3
-
Security Level: Public
-
None
Description
email from a customer
**************************
Hi guys,
I noticed that Moxi does not handle the "stats detail on|off|dump" command when I telnet to it. It would seem that the code is deliberately prohibiting it for fear that someone might issue a "stats cachedump [id] [limit]" command. However, a "stats detail" command is relatively benign and should be permitted. It is especially useful in a development scenario.
Here is the code that should be included into cproxy_protocol_a.c at approximately line 262:
} else if (ntokens == 4 &&
(false == self_command) &&
(strncmp(cmd, "stats detail", 11) == 0) &&
(c->cmd_curr = PROTOCOL_BINARY_CMD_STAT))
Whilst this works then are still a couple of bugs that I'll leave for you guys to fix. The first is when turning details on the response should be "OK" however the output is "END." It should be consistent with the memcached protocol in that regard. The second bug is when a malformed stats detail command is entered, i.e., "stats detail foo" then the response should be "CLIENT_ERROR usage: stats detail on|off|dump" instead "END" is returned to the upstream client.
The output of the "stats detail dump" command is as expected.
Thanks,