summaryrefslogtreecommitdiff
path: root/scripts/memcached-tool
diff options
context:
space:
mode:
authorRyan Tomayko <rtomayko@gmail.com>2009-08-25 20:55:49 -0700
committerDustin Sallings <dustin@spy.net>2009-09-21 20:49:21 -0700
commit7af0829ced0ff7220cd7e5fb274150087b2d6407 (patch)
treeb05364f777a7bef75abd1f0caf1d4d0c65d1965b /scripts/memcached-tool
parent2fe44f1c75621c5c759b3314f3cd19ccde7f5df2 (diff)
downloadmemcached-7af0829ced0ff7220cd7e5fb274150087b2d6407.tar.gz
memcached-tool shows: evictions, evict_time, and OOM counts
Diffstat (limited to 'scripts/memcached-tool')
-rwxr-xr-xscripts/memcached-tool14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/memcached-tool b/scripts/memcached-tool
index 4471065..c18f242 100755
--- a/scripts/memcached-tool
+++ b/scripts/memcached-tool
@@ -178,15 +178,17 @@ while (<$sock>) {
}
}
-print " # Item_Size Max_age 1MB_pages Count Full?\n";
+print " # Item_Size Max_age Pages Count Full? Evicted Evict_Time OOM\n";
foreach my $n (1..40) {
my $it = $items{$n};
next if (0 == $it->{total_pages});
- my $size = $it->{chunk_size} < 1024 ? "$it->{chunk_size} B " :
- sprintf("%.1f kB", $it->{chunk_size} / 1024.0);
+ my $size = $it->{chunk_size} < 1024 ?
+ "$it->{chunk_size}B" :
+ sprintf("%.1fK", $it->{chunk_size} / 1024.0);
my $full = $it->{free_chunks_end} == 0 ? "yes" : " no";
- printf "%3d %8s %7d s %7d %7d %7s\n",
- $n, $size, $it->{age}, $it->{total_pages},
- $it->{number}, $full;
+ printf("%3d %8s %9ds %7d %7d %7s %8d %8d %4d\n",
+ $n, $size, $it->{age}, $it->{total_pages},
+ $it->{number}, $full, $it->{evicted},
+ $it->{evicted_time}, $it->{outofmemory});
}