Hello,
there are few bugs in our sf.net bug tracker that complain about big
disks and values reported by net-snmp agent. See items 2340904, 2340840,
1743171, 1445722 and 1523452. It's also tracked as 5.4.2 open item on
our Wiki.
There are basically two problematic areas:
HOST-RESOURCES-MIB:
hrStorageSize - Integer32 (0..2147483647):
The size of the storage represented by this entry, in
units of hrStorageAllocationUnits.
hrStorageUsed - Integer32 (0..2147483647)
The amount of the storage represented by this entry
that is allocated, in units of hrStorageAllocationUnits.
We cannot influence hrStorageAllocationUnits and if it is small, both
can overflow on bigger devices (8TB with 4kB big units, which is default
for most Linux filesystem).
We could 'lie' and report bigger allocation units to keep hrStorageSize
below 2147483647, but I don't feel comfortable with that. Still, I
don't see any other option - we cannot edit the MIB, it's extracted from
RFC. What do you think about it?
UCD-SNMP-MIB:
dskTotal - Integer32
Total size of the disk/partition (kBytes)
dskAvail - Integer32
Available space on the disk
dskUsed - Integer32
Used space on the disk
dskMinimum seems OK to me, it's still limited to Integer32, but I don't
see much usage for its values > 2TB.
I assume that the units of dskAvail and dskUsed are both kBytes. Here
the values overflow with 2TB devices, which are pretty common now.
Fortunately, it's 'our' MIB and we can add new items there. There
already was one attempt, see patch #1523452 (using Counter64).
IMHO the best way is to provide two 32bit values for each OID, one for
low 32 bits, second for the higher 32 bits.
Is it possible to modify types of dskTotal, dskAvail and dskUsed to
'Unsigned32'? I am afraid the MIB is widely distributed and some
tools/agents can be confused getting unexpectedly big numbers from snmpd
with Unsigned32 dskTotal.
And can I add dsk{Total,Avail,Used}High?
The rest (coding & testing) is straightforward and I can manage it on my
own, I am just not sure what's the process of MIB editing. Attached you
can find patch for UCD-DISKIO-MIB.txt. It's just a proposal, I want to
have some agreed version before I start coding.
Jan
Index: UCD-SNMP-MIB.txt
===================================================================
--- UCD-SNMP-MIB.txt (revision 17310)
+++ UCD-SNMP-MIB.txt (working copy)
@@ -718,7 +718,7 @@
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "Available space on the disk"
+ "Available space on the disk (kBytes)"
::= { dskEntry 7 }
dskUsed OBJECT-TYPE
@@ -726,7 +726,7 @@
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "Used space on the disk"
+ "Used space on the disk (kBytes)"
::= { dskEntry 8 }
dskPercent OBJECT-TYPE
@@ -745,6 +745,33 @@
"Percentage of inodes used on disk"
::= { dskEntry 10 }
+dskTotalHigh OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Total size of the disk/partion in units of 2TBytes. Together with
+ dskTotal it composes 64-bit disk size in kBytes."
+ ::= { dskEntry 11 }
+
+dskAvailHigh OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Available space on the disk in units of 2TBytes. Together with
+ dskAvail it composes 64-bit number."
+ ::= { dskEntry 12 }
+
+dskUsedHigh OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Used space on the disk in units of 2TBytes. Together with dskUsed it
+ composes 64-bit number."
+ ::= { dskEntry 13 }
+
dskErrorFlag OBJECT-TYPE
SYNTAX UCDErrorFlag
MAX-ACCESS read-only
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders