Bug 1069979 - SNMP HRPROCESSORLOAD RETURNS INCORRECT VALUES FOR PROCESSOR #'S > 100
Summary: SNMP HRPROCESSORLOAD RETURNS INCORRECT VALUES FOR PROCESSOR #'S > 100
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: net-snmp
Version: 5.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1070075 1070076
TreeView+ depends on / blocked
 
Reported: 2014-02-26 02:22 UTC by Luan Jianhai
Modified: 2014-02-26 08:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1070075 1070076 (view as bug list)
Environment:
Last Closed: 2014-02-26 08:30:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The patch to fix the issue. (978 bytes, patch)
2014-02-26 02:22 UTC, Luan Jianhai
no flags Details | Diff

Description Luan Jianhai 2014-02-26 02:22:56 UTC
Created attachment 867723 [details]
The patch to fix the issue.

Description of problem:
using snmp monitor cpu usage with more than 100 processors. hrProcessorLoad will returns incorrect values for processor #'s > 100

Version-Release number of selected component (if applicable):
RHEL 5.x RHEL 6.x

How reproducible:

Steps to Reproduce:
1. using snmp monitor cpu usage with more than 100 processors.

Actual results:
hrProcessorLoad will return incorrect values for processor #'s

Expected results:
hrProcessorLoad will return correct values for processor #'s (letter than 100)

Additional info:
http://mailing.unix.net-snmp-users.narkive.com/o21D50GY/hrprocessorload-returns-incorrect-values-for-processor-s-100

The file agent/mibgroup/hardware/cpu/cpu_linux.c: netsnmp_cpu_arch_load() use below  hard code to skip cpuN
  b1 = b2+5; /* Skip "cpuN " */

When processor more than 100, the value will be wrong.

Comment 1 Luan Jianhai 2014-02-26 02:41:40 UTC
The patch have be applied to net-snmp upstream:
  http://git.code.sf.net/p/net-snmp/code: 
commit eef2f64b46357b353c79504bc593535ebe7421e7
Author: Niels Baggesen <nba.net>
Date:   Thu Jan 23 16:27:07 2014 +0100

    cpu_linux: support systems with more than 100 cpus.

Comment 2 Jan Safranek 2014-02-26 08:30:02 UTC
Thanks for the report. RHEL 5 is in maintenance mode and only critical bugs are fixed. Please contact your Red Hat support, e.g. at https://access.redhat.com/ and negotiate an exception.

I've cloned the bug into newer RHEL releases (6+7) and it should be better there. However, a support ticket would speed up the bugfix there.


Note You need to log in before you can comment on or make changes to this bug.