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
dac776bc
Commit
dac776bc
authored
Mar 13, 2002
by
Robert Ricci
Browse files
Add Intel support to portstats.
parent
acc39e6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/portstats.in
View file @
dac776bc
...
...
@@ -15,7 +15,6 @@ use lib '@prefix@/lib';
use
libdb
;
use
snmpit_lib
;
use
snmpit_cisco
;
use
English
;
use
Getopt::
Long
;
...
...
@@ -156,7 +155,23 @@ foreach my $name (keys %portMap) {
#
# Connect to the switch and get the data we want off of it
#
my
$device
=
new
snmpit_cisco
(
$name
);
my
$type
=
getDeviceType
(
$name
);
my
$device
;
SWITCH:
for
(
$type
)
{
/cisco/
&&
do
{
require
snmpit_cisco
;
$device
=
new
snmpit_cisco
(
$name
);
last
;
};
/intel/
&&
do
{
require
snmpit_intel
;
$device
=
new
snmpit_intel
(
$name
);
last
;
};
# 'default' case
die
"
Unknown switch type (
$type
) for
$name
\n
";
}
my
@results
=
$device
->
getFields
(
\
@ports
,
\
@oids
);
foreach
my
$result
(
@results
)
{
...
...
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