Bug 111502 - host/hr_storage is broken in 5.1
Summary: host/hr_storage is broken in 5.1
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: net-snmp
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-04 17:45 UTC by Kaj J. Niemi
Modified: 2015-03-05 01:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-12-10 14:49:53 UTC
Embargoed:


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

Description Kaj J. Niemi 2003-12-04 17:45:47 UTC
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 18:41:03 UTC
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 20:57:22 UTC
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 21:37:43 UTC
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 14:49:53 UTC
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.