From: phk Date: Thu, 10 Jul 2008 07:32:07 +0000 (+0000) Subject: Open the shm statistics when we launch a varnish X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60f17bba9ee3342208a20f50ffc16f5afe6c2e2b;p=varnish Open the shm statistics when we launch a varnish git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2911 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/Makefile.am b/varnish-cache/bin/varnishtest/Makefile.am index e4c47eb6..3a219d03 100644 --- a/varnish-cache/bin/varnishtest/Makefile.am +++ b/varnish-cache/bin/varnishtest/Makefile.am @@ -16,6 +16,7 @@ varnishtest_SOURCES = \ varnishtest_LDADD = \ $(top_builddir)/lib/libvarnish/libvarnish.la \ $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \ + $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \ ${PTHREAD_LIBS} EXTRA_DIST = $(top_srcdir)/bin/varnishtest/tests/*.vtc \ diff --git a/varnish-cache/bin/varnishtest/vtc_varnish.c b/varnish-cache/bin/varnishtest/vtc_varnish.c index 4b8ca9a8..1fbec6e5 100644 --- a/varnish-cache/bin/varnishtest/vtc_varnish.c +++ b/varnish-cache/bin/varnishtest/vtc_varnish.c @@ -43,6 +43,7 @@ #include "vqueue.h" #include "miniobj.h" #include "libvarnish.h" +#include "varnishapi.h" #include "cli.h" #include "cli_common.h" #include "vss.h" @@ -58,6 +59,8 @@ struct varnish { struct vtclog *vl1; VTAILQ_ENTRY(varnish) list; + struct varnish_stats *stats; + const char *args; int fds[4]; pid_t pid; @@ -217,6 +220,8 @@ varnish_launch(struct varnish *v) vsb_delete(vsb); AZ(pthread_create(&v->tp, NULL, varnish_thread, v)); + v->stats = VSL_OpenStats(v->name); + vtc_log(v->vl, 3, "opening CLI connection"); for (i = 0; i < 10; i++) { (void)usleep(200000);