Skip to content

Commit

Permalink
Merge pull request #1559 from mattsta/more-detailed-process-title
Browse files Browse the repository at this point in the history
Add cluster or sentinel to proc title
  • Loading branch information
antirez committed Feb 21, 2014
2 parents d7da507 + 2c273e3 commit 1d7d1d9
Showing 1 changed file with 7 additions and 2 deletions.
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) {
#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,
server.bindaddr_count ? server.bindaddr[0] : "*",
server.port);
server.port,
server_mode);
#else
REDIS_NOTUSED(title);
#endif
Expand Down

0 comments on commit 1d7d1d9

Please sign in to comment.