Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device: fix Brocade ironware processor precision #7730

Merged
merged 1 commit into from Nov 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions includes/discovery/processors/ironware.inc.php
Expand Up @@ -8,14 +8,14 @@
foreach ($processors_array as $index => $entry) {
if (($entry['snAgentCpuUtilValue'] || $entry['snAgentCpuUtil100thPercent']) && $entry['snAgentCpuUtilInterval'] == '300') {
// $entPhysicalIndex = $entry['cpmCPUTotalPhysicalIndex'];
if ($entry['snAgentCpuUtil100thPercent']) {
if (is_numeric($entry['snAgentCpuUtil100thPercent'])) {
$usage_oid = '.1.3.6.1.4.1.1991.1.1.2.11.1.1.6.'.$index;
$usage = $entry['snAgentCpuUtil100thPercent'];
$precision = 100;
} elseif ($entry['snAgentCpuUtilValue']) {
$usage = $entry['snAgentCpuUtil100thPercent'] / $precision;
} elseif (is_numeric($entry['snAgentCpuUtilValue'])) {
$usage_oid = '.1.3.6.1.4.1.1991.1.1.2.11.1.1.4.'.$index;
$usage = $entry['snAgentCpuUtilValue'];
$precision = 100;
$precision = 1;
$usage = $entry['snAgentCpuUtilValue'] / $precision;
}

list($slot, $instance, $interval) = explode('.', $index);
Expand Down