mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 11:51:01 +00:00
Merge pull request #1559 from mattsta/more-detailed-process-title
Add cluster or sentinel to proc title
This commit is contained in:
commit
1d7d1d9b1f
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user