]> git.saurik.com Git - redis.git/commitdiff
Added new INFO fields related to the new AOF auto rewrite feature
authorantirez <antirez@gmail.com>
Fri, 10 Jun 2011 12:52:47 +0000 (14:52 +0200)
committerantirez <antirez@gmail.com>
Fri, 10 Jun 2011 12:52:47 +0000 (14:52 +0200)
src/redis.c

index dbc800fd4d9c2cd15a02e342ba2e1f1259f7b70d..bf51db9d536df64fa675f22aea4565a63d19a217 100644 (file)
@@ -1393,6 +1393,16 @@ sds genRedisInfoString(char *section) {
             server.lastsave,
             server.bgrewritechildpid != -1);
 
             server.lastsave,
             server.bgrewritechildpid != -1);
 
+        if (server.appendonly) {
+            info = sdscatprintf(info,
+                "aof_current_size:%lld\r\n"
+                "aof_base_size:%lld\r\n"
+                "aof_pending_rewrite:%d\r\n",
+                (long long) server.appendonly_current_size,
+                (long long) server.auto_aofrewrite_base_size,
+                server.aofrewrite_scheduled);
+        }
+
         if (server.loading) {
             double perc;
             time_t eta, elapsed;
         if (server.loading) {
             double perc;
             time_t eta, elapsed;