SNMP OID for Disk Usage on a Mac

March 30, 2011

.1.3.6.1.2.1.25.2.3.1.6.31

It took me a really long time to find that, but that’s the OID for this MIB:

.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.31

Which, when divided by 262144 gives you the total GB used on a Mac HD.

I know you don’t care. But I do.

I got it by running this command to get the MIB descriptions and finding the value I needed (4096/1024^3 = 1/262144):

snmpwalk -c whp localhost

Then I ran this to get the MIBs for everything:

snmpwalk -Os -c whp -v localhost

Then I searched the output of that command for the same value as was returned by the first command, and Bob’s your uncle.


Follow

Get every new post delivered to your Inbox.