From: Ben Pfaff Date: Fri, 19 Dec 2008 23:10:18 +0000 (-0800) Subject: vswitch: Pass --monitor to secchan processes, to allow monitoring them. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61f527dc48821b05f78ea5f5a1435f9225a99fdd;p=openvswitch vswitch: Pass --monitor to secchan processes, to allow monitoring them. --- 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}",