Commit 0c9990f9 authored by Leigh B Stoller's avatar Leigh B Stoller

Have capture write the run log to a local file, having that history

for debugging is really handy. Requires updated version of capture
be installed on the XEN host.
parent eb777f4d
......@@ -65,6 +65,10 @@ use libvnode;
my $TMCD_PORT = 7777;
my $SLOTHD_PORT = 8509;
my $EVPROXY_PORT= 16505;
# where all our config files go
my $VMS = "/var/emulab/vms";
my $VMDIR = "$VMS/vminfo";
my $LOGPATH = "$VMDIR/$vnode_id";
my $IPTABLES = "/sbin/iptables";
my $ARPING = "/usr/bin/arping";
# For testing.
......@@ -281,10 +285,14 @@ sub Online()
$tty =~ s,\/dev\/,,;
# unlink so that we know when capture is ready.
my $acl = "/var/log/tiplogs/$vnode_id.acl";
my $acl = "$LOGPATH/$vnode_id.acl";
if (-e $acl);
mysystem2("$BINDIR/capture -C -n -i $vnode_id $tty");
# Remove old log file before start.
my $logfile = "$LOGPATH/$vnode_id.log";
if (-e $logfile);
mysystem2("$BINDIR/capture -C -i -l $LOGPATH $vnode_id $tty");
# We need to tell tmcd about it. But do not hang, use timeout.
# Also need to wait for the acl file, since capture is running
......@@ -446,8 +454,8 @@ sub Offline()
mysystem2("/bin/kill $pid");
if (-e "/var/log/tiplogs/$") {
my $pid = `cat /var/log/tiplogs/$`;
if (-e "$LOGPATH/$") {
my $pid = `cat $LOGPATH/$`;
mysystem2("/bin/kill $pid");
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