Permalink
Browse files

Merge pull request #1559 from mattsta/more-detailed-process-title

Add cluster or sentinel to proc title
  • Loading branch information...
2 parents d7da507 + 2c273e3 commit 1d7d1d9b1fb27b23321c7a9e8adac7d6c1122d2a @antirez committed Feb 21, 2014
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/redis.c
View
@@ -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

0 comments on commit 1d7d1d9

Please sign in to comment.