From f90efb777e087ed2c24af080cb033a256969e766 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 22 Dec 2008 12:45:58 +0100 Subject: cache_iterators: add total entries available in the cache to stats This patch adds the total number of entries currently living in the cache. Currently, we have two type of entries, active and inactive. The inactive ones talk about an ended connection. This is useful for trouble-shooting if we hit enospc when adding new entries. Signed-off-by: Pablo Neira Ayuso --- src/cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cache.c b/src/cache.c index 5e7d738..6106d28 100644 --- a/src/cache.c +++ b/src/cache.c @@ -455,7 +455,7 @@ void cache_stats_extended(const struct cache *c, int fd) int size; size = snprintf(buf, sizeof(buf), - "cache:%s\tactive connections:\t%12u\n" + "cache:%s\tactive/total entries:\t%12u/%12u\n" "\tcreation OK:\t\t\t%12u\n" "\tcreation failed:\t\t%12u\n" "\t\tno memory available:\t%12u\n" @@ -467,7 +467,7 @@ void cache_stats_extended(const struct cache *c, int fd) "\tdeletion failed:\t\t%12u\n" "\t\tentry not found:\t%12u\n", c->name, - c->stats.active, + c->stats.active, hashtable_counter(c->h), c->stats.add_ok, c->stats.add_fail, c->stats.add_fail_enomem, -- cgit v1.2.3