From: phk Date: Thu, 20 Jul 2006 14:46:49 +0000 (+0000) Subject: Keep an eye on deathrow X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a27b5db2807e512749c0b51e28773bb663446746;p=varnish Keep an eye on deathrow git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@529 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_expire.c b/varnish-cache/bin/varnishd/cache_expire.c index 5bd53fe4..a1c570bf 100644 --- a/varnish-cache/bin/varnishd/cache_expire.c +++ b/varnish-cache/bin/varnishd/cache_expire.c @@ -76,8 +76,10 @@ exp_hangman(void *arg) continue; } TAILQ_REMOVE(&exp_deathrow, o, deathrow); + VSL_stats->n_deathrow--; + VSL_stats->n_expired++; AZ(pthread_mutex_unlock(&exp_mtx)); - VSL(SLT_ExpKill, 0, "%u", o->xid); + VSL(SLT_ExpKill, 0, "%u %d", o->xid, (int)(o->ttl - t)); HSH_Deref(o); } } @@ -124,6 +126,7 @@ exp_prefetch(void *arg) if (sp->handling == VCL_RET_DISCARD) { AZ(pthread_mutex_lock(&exp_mtx)); TAILQ_INSERT_TAIL(&exp_deathrow, o, deathrow); + VSL_stats->n_deathrow++; AZ(pthread_mutex_unlock(&exp_mtx)); continue; } diff --git a/varnish-cache/include/stat_field.h b/varnish-cache/include/stat_field.h index 3ca5ebca..b1463b8a 100644 --- a/varnish-cache/include/stat_field.h +++ b/varnish-cache/include/stat_field.h @@ -26,4 +26,7 @@ MAC_STAT(n_wrk_max, uint64_t, "u", "N worker threads limited") MAC_STAT(n_wrk_busy, uint64_t, "u", "N busy worker threads") MAC_STAT(n_wrk_queue, uint64_t, "u", "N queued work requests") +MAC_STAT(n_expired, uint64_t, "u", "N expired objects") +MAC_STAT(n_deathrow, uint64_t, "u", "N objects on deathrow") + MAC_STAT(losthdr, uint64_t, "u", "HTTP header overflows")