On Thu, 2005-05-26 at 15:08, Jim Ruddell wrote:
> I'm reposting this request in the hopes that someone has a work around 
> to something that seems to be a serious oversight with SNMP.

I think you need to keep clear the distinction between fundamental
problems with SNMP (either in general, or relating to particular
MIBs), and problems with a particular implementation.


>                                                       I'm looking 
> for a way to monitor used (or available) swap on Linux systems. The 
> standard MIBS I've tried are limited to either 2 or 4 gig.

I'm not aware of a standard MIB that is specifically dedicated to
monitoring swap usage.   There's the UCD-specific objects (which
*are* flawed in their design), but the most relevant standard
MIB objects are those of the HOST-RESOURCES-MIB:hrStorage table
(as you've clearly recognised).

>                                                      One cause is 
> the limitations of a 32 bit Int variable. What concerns me more is the 
> hrStorage tree and how it reports swap and real in that it's limited to 
> 2 gig

That's not strictly correct.
The hrStorageTable uses two 32-bit integer variables to report
storage sizes, so can in principle accommodate reporting values
up to 2^64 bytes (with some loss of accuracy at the higher end).
[Actually, it's probably only 2^62 bytes due to the ranges in
the MIB definitions, but that's likely to prove sufficient!]

The problems you are seeing are more likely to be down to the
Net-SNMP implementation of this particular MIB, which doesn't
attempt to adjust the 'hrStorageAllocationUnits' value for
larger storage areas.  Sticking to a hrStorageSize granularity
of 1 byte will indeed limit this to a maximum of 2Gb.


> My questions are; Is there something wrong with the way I'm
> interpreting the results I see? Is this a bug?

It's not so much a bug, as a limitation of the existing code.
If the implementation was adjusted to use an AllocationUnit
of 1024, then this would raise the limit to 2Tb
(matching the hard limit on hrMemorySize)
Raising the AllocationUnit size higher (to 1Mb, or more)
would increase the limit to 2Pb or above.


>  Can I right my own agent? I am a developer BTW.

You wouldn't need to develop your own agent from scratch.
It should just be a matter of fixing the handling within
the 'mibgroup/host/hr_storage.c' file.
  The main difficulty would probably be making sure that
you can retrieve the underlying values into suitably sized
variables (preferably without breaking other architectures!)

Patches to achieve this would be gratefully received.

Dave



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to