From 61f527dc48821b05f78ea5f5a1435f9225a99fdd Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 19 Dec 2008 15:10:18 -0800 Subject: [PATCH] vswitch: Pass --monitor to secchan processes, to allow monitoring them. --- vswitchd/bridge.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 0e88885e..94baf395 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -41,9 +41,11 @@ #include #include #include +#include #include #include #include "cfg.h" +#include "dirs.h" #include "dpif.h" #include "flow.h" #include "list.h" @@ -295,6 +297,7 @@ static struct bridge * bridge_create(const char *name) { struct bridge *br; + struct stat s; struct svec argv; char *dp_name; int sockets[2]; @@ -352,6 +355,11 @@ bridge_create(const char *name) svec_add(&argv, "--fail=closed"); svec_add(&argv, "--max-backoff=1"); svec_add(&argv, "--no-stp"); + if (!stat(ofp_rundir, &s)) { + svec_add_nocopy(&argv, + xasprintf("--monitor=punix:%s/secchan%d.monitor", + ofp_rundir, br->dp_idx)); + } svec_add_nocopy(&argv, xasprintf("-vPATTERN:console:%s|secchan(nl:%d)|%s", "%d{%b %d %H:%M:%S}", -- 2.30.2