Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
81f80371
Commit
81f80371
authored
Apr 26, 2007
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify last fix. We need to check two OIDs to cover all known APC models.
parent
154d4c9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
tbsetup/snmpit_apc.pm
tbsetup/snmpit_apc.pm
+11
-5
No files found.
tbsetup/snmpit_apc.pm
View file @
81f80371
...
...
@@ -121,17 +121,23 @@ sub status {
# come first, we use them. We grab the number of phases supported,
# then use that as a limit on how many status load values we retrieve.
#
# The OID to retrieve the phases is: ".1.3.6.1.4.1.318.1.1.12.1.9";
# The OID to retrieve the phases is: ".1.3.6.1.4.1.318.1.1.12.1.9"
# for more recent units, or: ".1.3.6.1.4.1.318.1.1.12.2.1.2"
# for older ones;
# the load status table OID is: ".1.3.6.1.4.1.318.1.1.12.2.3.1.1.2".
#
my
$phases
;
$phases
=
$self
->
{
SESS
}
->
get
([["
rPDUIdentDeviceNumPhases
",
0
]]);
if
(
!
$phases
)
{
# not all models support this MIB
print
STDERR
"
Query phase: IdentDeviceNumPhases failed
\n
"
if
$self
->
{
DEBUG
};
return
0
;
# not all models support this MIB, try another
$phases
=
$self
->
{
SESS
}
->
get
([["
rPDULoadDevNumPhases
",
0
]]);
if
(
!
$phases
)
{
# some don't support either, bail.
print
STDERR
"
Query phase: IdentDeviceNumPhases/LoadDevNumPhases failed
\n
"
if
$self
->
{
DEBUG
};
return
0
;
}
}
print
"
Okay.
\n
Phase report was '
$phases
'
\n
"
if
$self
->
{
DEBUG
};
...
...
Write
Preview
Markdown
is supported
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