summaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/debug.c b/src/debug.c
index b95daaa36..4f0e37777 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -482,10 +482,12 @@ void debugCommand(client *c) {
" Show low level client eviction pools info (maxmemory-clients).",
"PAUSE-CRON <0|1>",
" Stop periodic cron job processing.",
-"REPLYBUFFER-PEAK-RESET-TIME <NEVER||RESET|time>",
+"REPLYBUFFER PEAK-RESET-TIME <NEVER||RESET|time>",
" Sets the time (in milliseconds) to wait between client reply buffer peak resets.",
" In case NEVER is provided the last observed peak will never be reset",
" In case RESET is provided the peak reset time will be restored to the default value",
+"REPLYBUFFER RESIZING <0|1>",
+" Enable or disable the replay buffer resize cron job",
NULL
};
addReplyHelp(c, help);
@@ -793,6 +795,10 @@ NULL
* also have a normal reply type after the attribute. */
addReplyBulkCString(c,"Some real reply following the attribute");
} else if (!strcasecmp(name,"push")) {
+ if (c->resp < 3) {
+ addReplyError(c,"RESP2 is not supported by this command");
+ return;
+ }
addReplyPushLen(c,2);
addReplyBulkCString(c,"server-cpu-usage");
addReplyLongLong(c,42);
@@ -962,14 +968,21 @@ NULL
{
server.pause_cron = atoi(c->argv[2]->ptr);
addReply(c,shared.ok);
- } else if (!strcasecmp(c->argv[1]->ptr,"replybuffer-peak-reset-time") && c->argc == 3 ) {
- if (!strcasecmp(c->argv[2]->ptr, "never")) {
- server.reply_buffer_peak_reset_time = -1;
- } else if(!strcasecmp(c->argv[2]->ptr, "reset")) {
- server.reply_buffer_peak_reset_time = REPLY_BUFFER_DEFAULT_PEAK_RESET_TIME;
+ } else if (!strcasecmp(c->argv[1]->ptr,"replybuffer") && c->argc == 4 ) {
+ if(!strcasecmp(c->argv[2]->ptr, "peak-reset-time")) {
+ if (!strcasecmp(c->argv[3]->ptr, "never")) {
+ server.reply_buffer_peak_reset_time = -1;
+ } else if(!strcasecmp(c->argv[3]->ptr, "reset")) {
+ server.reply_buffer_peak_reset_time = REPLY_BUFFER_DEFAULT_PEAK_RESET_TIME;
+ } else {
+ if (getLongFromObjectOrReply(c, c->argv[3], &server.reply_buffer_peak_reset_time, NULL) != C_OK)
+ return;
+ }
+ } else if(!strcasecmp(c->argv[2]->ptr,"resizing")) {
+ server.reply_buffer_resizing_enabled = atoi(c->argv[3]->ptr);
} else {
- if (getLongFromObjectOrReply(c, c->argv[2], &server.reply_buffer_peak_reset_time, NULL) != C_OK)
- return;
+ addReplySubcommandSyntaxError(c);
+ return;
}
addReply(c, shared.ok);
} else {
@@ -1943,7 +1956,7 @@ void sigsegvHandler(int sig, siginfo_t *info, void *secret) {
serverLog(LL_WARNING,
"Accessing address: %p", (void*)info->si_addr);
}
- if (info->si_code <= SI_USER && info->si_pid != -1) {
+ if (info->si_code == SI_USER && info->si_pid != -1) {
serverLog(LL_WARNING, "Killed by PID: %ld, UID: %d", (long) info->si_pid, info->si_uid);
}