From 0aca33d52369295b2811eaec0c6bf292cb98a9b3 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 22 Jul 2008 14:40:33 +0000 Subject: [PATCH] Add a counter for shmlog wraparounds. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2993 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/shmlog.c | 1 + varnish-cache/include/stat_field.h | 1 + 2 files changed, 2 insertions(+) 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") -- 2.39.5