]> err.no Git - varnish/commitdiff
Open the shm statistics when we launch a varnish
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 10 Jul 2008 07:32:07 +0000 (07:32 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 10 Jul 2008 07:32:07 +0000 (07:32 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2911 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/Makefile.am
varnish-cache/bin/varnishtest/vtc_varnish.c

index e4c47eb6325fb572860dad81e438568417080621..3a219d0323d03ac5b4ea3a79963c7334abac84a2 100644 (file)
@@ -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 \
index 4b8ca9a80d618c7e79300bfffb6f0e3dc1430978..1fbec6e55c8af1a1ddd5042ffbdc1df3489b329d 100644 (file)
@@ -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);