Re: Help Requested to know the format of DiskSpace , using snmpwalk
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2005-12-01 at 07:52 +0000, John Joseph wrote:
> Hi
> I am trying to find the disk space using snmpwalk
> $ snmpwalk 192.168.20.99 -c public hrStorageSize
> The "HOST-RESOURCES-MIB::hrStorageSize.4 =
> INTEGER: 12672022" gives the value of the disk size
> for the root
> I do not have any idea , in which format this
> result is displayed , and what should I do to convert
> it to GB
>From the HOST-RESOURCES-MIB:
hrStorageSize OBJECT-TYPE
DESCRIPTION
"The size of the storage represented by this entry,
in units of hrStorageAllocationUnits...."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hrStorageAllocationUnits OBJECT-TYPE
DESCRIPTION
"The size, in bytes, of the data objects allocated
from this pool....."
So you'll need to retrieve the corresponding
hrStorageAllocationUnits to interpret the storage
sizes correctly.
These units will typically remain constant for a given
disk (and may well be the same for all disks) - so you
should only need to query this once.
Dave
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users