Commit 5ec293b7 authored by Mike Hibler's avatar Mike Hibler
Browse files

Ignore warnings from snmpit, fix up the node RE to include '-'.

parent b2cebd77
#!/usr/bin/perl -wT
#
# Copyright (c) 2008-2016 University of Utah and the Flux Group.
# Copyright (c) 2008-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -218,6 +218,8 @@ while (my %row = $query_result->fetchhash()) {
print "$pc "
if ($debug);
}
print "\n"
if ($debug);
my %before = ();
if ($interval > 0) {
......@@ -352,7 +354,9 @@ sub gather($$)
open(PS, "$portstats $arg -p $slist 2>&1 |") or
die "Could not get portstats\n";
while (<PS>) {
next if ($_ !~ /^\w+:\d/);
# XXX ignore warnings from snmpit
next if ($_ =~ /^WARNING:/);
next if ($_ !~ /^[-\w]+:\d/);
my ($node, @counts) = split;
if (@counts != 6) {
print STDERR "*** $node: invalid portstats!?\n";
......
Supports Markdown
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