Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
5ec293b7
Commit
5ec293b7
authored
Feb 18, 2017
by
Mike Hibler
Browse files
Ignore warnings from snmpit, fix up the node RE to include '-'.
parent
b2cebd77
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/node_traffic.in
View file @
5ec293b7
#!/usr/bin/perl -wT
#
# Copyright (c) 2008-201
6
University of Utah and the Flux Group.
# Copyright (c) 2008-201
7
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
";
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment