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

Already on GitHub? Sign in to your account

added hostname to `INFO` command to `server` section #571

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −0
Split
View
@@ -1866,6 +1866,7 @@ sds genRedisInfoString(char *section) {
uname(&name);
info = sdscatprintf(info,
"# Server\r\n"
+ "hostname:%s\r\n"
"redis_version:%s\r\n"
"redis_git_sha1:%s\r\n"
"redis_git_dirty:%d\r\n"
@@ -1879,6 +1880,7 @@ sds genRedisInfoString(char *section) {
"uptime_in_seconds:%ld\r\n"
"uptime_in_days:%ld\r\n"
"lru_clock:%ld\r\n",
+ name.nodename,
REDIS_VERSION,
redisGitSHA1(),
strtol(redisGitDirty(),NULL,10) > 0,