Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cluster or sentinel to proc title #1559

Merged
merged 1 commit into from Feb 21, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/redis.c
Expand Up @@ -3079,10 +3079,15 @@ void redisOutOfMemoryHandler(size_t allocation_size) {


void redisSetProcTitle(char *title) { void redisSetProcTitle(char *title) {
#ifdef USE_SETPROCTITLE #ifdef USE_SETPROCTITLE
setproctitle("%s %s:%d", char *server_mode = "";
if (server.cluster_enabled) server_mode = " [cluster]";
else if (server.sentinel_mode) server_mode = " [sentinel]";

setproctitle("%s %s:%d%s",
title, title,
server.bindaddr_count ? server.bindaddr[0] : "*", server.bindaddr_count ? server.bindaddr[0] : "*",
server.port); server.port,
server_mode);
#else #else
REDIS_NOTUSED(title); REDIS_NOTUSED(title);
#endif #endif
Expand Down