Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
5ad1faa0
Commit
5ad1faa0
authored
Apr 04, 2012
by
antirez
Browse files
New "os" field in INFO output providing information about the operating system.
parent
bb0fbc84
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis.c
View file @
5ad1faa0
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
#include <float.h>
#include <float.h>
#include <math.h>
#include <math.h>
#include <sys/resource.h>
#include <sys/resource.h>
#include <sys/utsname.h>
/* Our shared "common" objects */
/* Our shared "common" objects */
...
@@ -1739,12 +1740,16 @@ sds genRedisInfoString(char *section) {
...
@@ -1739,12 +1740,16 @@ sds genRedisInfoString(char *section) {
/* Server */
/* Server */
if
(
allsections
||
defsections
||
!
strcasecmp
(
section
,
"server"
))
{
if
(
allsections
||
defsections
||
!
strcasecmp
(
section
,
"server"
))
{
struct
utsname
name
;
if
(
sections
++
)
info
=
sdscat
(
info
,
"
\r\n
"
);
if
(
sections
++
)
info
=
sdscat
(
info
,
"
\r\n
"
);
uname
(
&
name
);
info
=
sdscatprintf
(
info
,
info
=
sdscatprintf
(
info
,
"# Server
\r\n
"
"# Server
\r\n
"
"redis_version:%s
\r\n
"
"redis_version:%s
\r\n
"
"redis_git_sha1:%s
\r\n
"
"redis_git_sha1:%s
\r\n
"
"redis_git_dirty:%d
\r\n
"
"redis_git_dirty:%d
\r\n
"
"os:%s %s %s
\r\n
"
"arch_bits:%d
\r\n
"
"arch_bits:%d
\r\n
"
"multiplexing_api:%s
\r\n
"
"multiplexing_api:%s
\r\n
"
"gcc_version:%d.%d.%d
\r\n
"
"gcc_version:%d.%d.%d
\r\n
"
...
@@ -1757,6 +1762,7 @@ sds genRedisInfoString(char *section) {
...
@@ -1757,6 +1762,7 @@ sds genRedisInfoString(char *section) {
REDIS_VERSION
,
REDIS_VERSION
,
redisGitSHA1
(),
redisGitSHA1
(),
strtol
(
redisGitDirty
(),
NULL
,
10
)
>
0
,
strtol
(
redisGitDirty
(),
NULL
,
10
)
>
0
,
name
.
sysname
,
name
.
release
,
name
.
machine
,
server
.
arch_bits
,
server
.
arch_bits
,
aeGetApiName
(),
aeGetApiName
(),
#ifdef __GNUC__
#ifdef __GNUC__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment