Commit ac5dfc76 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Open the shm statistics when we launch a varnish



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2911 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 21dd3a37
......@@ -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 \
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment