Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to collect filesystem space information using SNMP on Solaris 10 and Ubuntu 11.10. The problem is that SNMP doesn't seem to have an attribute that corresponds to the "Available" column in df.

For example, here is the df -k output of my local filesystem:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb1             36841040  13489312  21480268  39% /

And here are the relevant attributes from the SNMP daemon (as per the Net-SNMP documentation):

HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: /
HOST-RESOURCES-MIB::hrStorageSize.31 = INTEGER: 9210260
HOST-RESOURCES-MIB::hrStorageUsed.31 = INTEGER: 3372328
HOST-RESOURCES-MIB::hrStorageAllocationUnits.31 = INTEGER: 4096 Bytes

Now 9210260*4 = 36841040, and 3372328*4 = 13489312, which match the columns in the df output. However, I can't see any attribute that corresponds to the "Available" column. Note that it's not just a matter of subtracting the two columns - the "Available" column seems to take into account some hidden overheads which vary per filesystem.

Is there a way to collect or calculate the "Available" column information using SNMP?

share|improve this question
up vote 3 down vote accepted

I think you need to do additional configuration on top of standard SNMP to get available space. The NET-SNMP documentation mentions the following:

There are two tables that can be used when monitoring disk space, UCD-SNMP-MIB:dskTable and HOST-RESOURCES-MIB:hrStorageTable. There are two noticeable differences bwtween these tables: UCD-SNMP-MIB:dskTable requires a configuration directive in snmpd.conf, but it also gives a direct measure of the percentage of free space

So sounds like you just need to use UCD-SNMP-MIB instead of HOST-RESOURCES-MIB to get to dskTable instead of hrStorageTable.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.