Bug 111502 - host/hr_storage is broken in 5.1
host/hr_storage is broken in 5.1
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: net-snmp (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-04 12:45 EST by Kaj J. Niemi
Modified: 2015-03-04 20:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-10 09:49:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Oneliner to enable disk volume sizes/usage again (432 bytes, patch)
2003-12-04 13:41 EST, Kaj J. Niemi
no flags Details | Diff
Adds output of memory buffers in use (2.13 KB, patch)
2003-12-04 15:57 EST, Kaj J. Niemi
no flags Details | Diff
Return total and buffers (instead of free memory and buffers) (2.13 KB, patch)
2003-12-04 16:37 EST, Kaj J. Niemi
no flags Details | Diff

  None (edit)
Description Kaj J. Niemi 2003-12-04 12:45:47 EST
Description of problem:
Seems like host/hr_table is broken in 5.1 on linux... hrStorageSize
(5), hrStorageUsed (6) are missing. 

Steps to Reproduce:
1. (size) snmpwalk -v 2c -c foo localhost .1.3.6.1.2.1.25.2.3.1.5
   (used) snmpwalk -v 2c -c foo localhost .1.3.6.1.2.1.25.2.3.1.5
  
Actual results:
Prints NOSUCHINSTANCE

Expected results:
hrStorageSize should print out something similar to:

% snmpwalk -O n -v 2c -c foo localhost .1.3.6.1.2.1.25.2.3.1.5
.1.3.6.1.2.1.25.2.3.1.5.1 = INTEGER: 251006
.1.3.6.1.2.1.25.2.3.1.5.2 = INTEGER: 26266935
.1.3.6.1.2.1.25.2.3.1.5.3 = INTEGER: 504011
.1.3.6.1.2.1.25.2.3.1.5.4 = INTEGER: 1512088
.1.3.6.1.2.1.25.2.3.1.5.5 = INTEGER: 504004
.1.3.6.1.2.1.25.2.3.1.5.6 = INTEGER: 29542469
.1.3.6.1.2.1.25.2.3.1.5.101 = INTEGER: 1548036
.1.3.6.1.2.1.25.2.3.1.5.102 = INTEGER: 2048248

and hrStorageUsed
% snmpwalk -O n -v 2c -c foo localhost  .1.3.6.1.2.1.25.2.3.1.6
.1.3.6.1.2.1.25.2.3.1.6.1 = INTEGER: 53895
.1.3.6.1.2.1.25.2.3.1.6.2 = INTEGER: 17009811
.1.3.6.1.2.1.25.2.3.1.6.3 = INTEGER: 8207
.1.3.6.1.2.1.25.2.3.1.6.4 = INTEGER: 266372
.1.3.6.1.2.1.25.2.3.1.6.5 = INTEGER: 25071
.1.3.6.1.2.1.25.2.3.1.6.6 = INTEGER: 2730738
.1.3.6.1.2.1.25.2.3.1.6.101 = INTEGER: 1537432
.1.3.6.1.2.1.25.2.3.1.6.102 = INTEGER: 199296
Comment 1 Kaj J. Niemi 2003-12-04 13:41:03 EST
Created attachment 96347 [details]
Oneliner to enable disk volume sizes/usage again

Seems to work for me.
Comment 2 Kaj J. Niemi 2003-12-04 15:57:22 EST
Created attachment 96353 [details]
Adds output of memory buffers in use

Ok. The real problem here was that if NO_DUMMY_VALUES is in use (it's the
default) var_hrstorage() returns NULL instead of *u_char. Somehow this hoses
everything in the calling layer above and no information further down the oid
row is will be returned.

I got bored determining what's calling what and decided to fix this issue
another way -- by adding to the missing functionality on linux preventing the
return of NULL. :)

Works for me, now, really.
Comment 3 Kaj J. Niemi 2003-12-04 16:37:43 EST
Created attachment 96354 [details]
Return total and buffers (instead of free memory and buffers)

I was figuring buffers would have been allocated from memory free but this
wasn't the case and it resulted in funny looking graphs (say there's only 10 M
free but 90M buffers you end up with 900% as an end result).. instead we return
the total amount of memory and the amount of buffers allocated.

Hopefully this will end with values 0 <= x <= 100 when dividing hrStorageUsed
with hrStorageSize.
Comment 4 Phil Knirsch 2003-12-10 09:49:53 EST
Yeah, that looks good. Have you submitted the patch to Wes or David
upstream? Might be a good idea if not. ;-)

Thanks again,

Read ya, Phil

PS: And of course it will be included in the next net-snmp-5.1-3
package. :-)

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