summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/memcached-automove-extstore3
-rw-r--r--slabs.c8
-rwxr-xr-xt/binary.t2
3 files changed, 5 insertions, 8 deletions
diff --git a/scripts/memcached-automove-extstore b/scripts/memcached-automove-extstore
index b813727..4578d17 100755
--- a/scripts/memcached-automove-extstore
+++ b/scripts/memcached-automove-extstore
@@ -198,8 +198,7 @@ def read_slab_stats(s):
# HACK: lets look at 'evictions' being nonzero to indicate memory filled at some point.
def read_stats(s):
stats = {}
- # HACK: Current version can't display global page pool. stupid me.
- s.write("slabs automove 1\r\nstats\r\nslabs automove 0\r\n")
+ s.write("stats\r\n")
while True:
line = s.readline().rstrip()
if line.startswith("END"):
diff --git a/slabs.c b/slabs.c
index 4546c7c..0ac1e3a 100644
--- a/slabs.c
+++ b/slabs.c
@@ -424,11 +424,9 @@ bool get_stats(const char *stat_type, int nkey, ADD_STAT add_stats, void *c) {
APPEND_STAT("curr_items", "%llu", (unsigned long long)stats_state.curr_items);
APPEND_STAT("total_items", "%llu", (unsigned long long)stats.total_items);
STATS_UNLOCK();
- if (settings.slab_automove > 0) {
- pthread_mutex_lock(&slabs_lock);
- APPEND_STAT("slab_global_page_pool", "%u", slabclass[SLAB_GLOBAL_PAGE_POOL].slabs);
- pthread_mutex_unlock(&slabs_lock);
- }
+ pthread_mutex_lock(&slabs_lock);
+ APPEND_STAT("slab_global_page_pool", "%u", slabclass[SLAB_GLOBAL_PAGE_POOL].slabs);
+ pthread_mutex_unlock(&slabs_lock);
item_stats_totals(add_stats, c);
} else if (nz_strcmp(nkey, stat_type, "items") == 0) {
item_stats(add_stats, c);
diff --git a/t/binary.t b/t/binary.t
index 587bd32..d7c0fb5 100755
--- a/t/binary.t
+++ b/t/binary.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 4982;
+use Test::More tests => 4994;
use FindBin qw($Bin);
use lib "$Bin/lib";
use MemcachedTest;