From: phk Date: Tue, 22 Jul 2008 14:40:33 +0000 (+0000) Subject: Add a counter for shmlog wraparounds. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aca33d52369295b2811eaec0c6bf292cb98a9b3;p=varnish Add a counter for shmlog wraparounds. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2993 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/shmlog.c b/varnish-cache/bin/varnishd/shmlog.c index c2d6cb66..47a99247 100644 --- a/varnish-cache/bin/varnishd/shmlog.c +++ b/varnish-cache/bin/varnishd/shmlog.c @@ -74,6 +74,7 @@ vsl_wrap(void) *logstart = SLT_ENDMARKER; logstart[loghead->ptr] = SLT_WRAPMARKER; loghead->ptr = 0; + VSL_stats->shm_cycles++; } static void diff --git a/varnish-cache/include/stat_field.h b/varnish-cache/include/stat_field.h index d3ea7e65..217d2305 100644 --- a/varnish-cache/include/stat_field.h +++ b/varnish-cache/include/stat_field.h @@ -92,6 +92,7 @@ MAC_STAT(shm_records, uint64_t, 'a', "SHM records") MAC_STAT(shm_writes, uint64_t, 'a', "SHM writes") MAC_STAT(shm_flushes, uint64_t, 'a', "SHM flushes due to overflow") MAC_STAT(shm_cont, uint64_t, 'a', "SHM MTX contention") +MAC_STAT(shm_cycles, uint64_t, 'a', "SHM cycles through buffer") MAC_STAT(sm_nreq, uint64_t, 'a', "allocator requests") MAC_STAT(sm_nobj, uint64_t, 'i', "outstanding allocations")