SNMP OID for Disk Usage on a Mac

.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.

Advertisement

One Response to SNMP OID for Disk Usage on a Mac

  1. Mego says:

    I only recently learned the phrase “Bob’s your uncle,” and you’re the first American I’ve ever heard/seen use it. (One of the Blazers is from Australia and he said it on Twitter the other day).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.