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 have two servers running Mac OS X 10.8.3 Server (Build 12D78) with SNMP reporting enabled. I have a cacti server set up collecting data from these hosts. My Load Average, CPU Usage, Disk Space Usage and network graphs all look great! But memory usage is all -nan across the board.

I saw this related question but it's so old I believe it is not valid for OS X Server 10.8.

When I run snmpwalk -v2c -c communityname . against the Mac OS X server, I get:

UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000 kB

Compare that to a FreeBSD server on my network:

kyle:~ dfjosh$ snmpwalk -v2c -c communityname .
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 2097024 kB
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 2097024 kB
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 504028 kB
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 27336 kB
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 34092 kB
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000 kB
UCD-SNMP-MIB::memShared.0 = INTEGER: 124432 kB
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 60320 kB
UCD-SNMP-MIB::memCached.0 = INTEGER: 6756 kB
UCD-SNMP-MIB::memSwapError.0 = INTEGER: noError(0)
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING: 
kyle:~ dfjosh$ snmpwalk -v2c -c farcry .
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000 kB

I tried compiling and installing net-SNMP from scratch, biut it didn't change the data returned.

How can I get Mac OS X Server to report memory usage (and, ideally, swap or page in/ous) via SNMP?

share|improve this question
(And please don't downvote me just because you dislike Mac OS X. This really is a server question! It's on topic, I swear!) – Josh Apr 3 '13 at 17:18

Probably silly question, but have you compared the config files between the BSD and the OS X Server?

Additionally have you compared the compile time configuration options between the machines?

'--build=x86_64-linux-gnu' '--includedir=/usr/include' '--mandir=/usr/share/man' '--
 infodir=/usr/share/info' '--localstatedir=/var' '--libexecdir=/usr/lib/net-snmp' '--disable-
 maintainer-mode' '--disable-dependency-tracking' '--prefix=/usr' '--sysconfdir=/etc' '--
 mandir=/usr/share/man' '--with-persistent-directory=/var/lib/snmp' '--enable-ucd-snmp-compatibility' 
 '--enable-shared' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-
 security' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 
-Wformat -Werror=format-security' 'FFLAGS=-g -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' '--
 with-perl-modules=INSTALLDIRS=vendor' '--enable-as-needed' '--enable-ipv6' '--with-logfile=none' '--
 without-rpm' '--with-libwrap' '--with-openssl' '--without-dmalloc' '--without-efence' '--without-
 rsaref' '--with-sys-contact=root' '--with-sys-location=Unknown' '--with-mib-modules=smux ucd- 
 snmp/dlmod ucd-snmp/diskio ucd-snmp/lmSensors  host' '--with-out-mib-modules=' '--enable-mfd-rewrites' '

This is what I have on my Linux machine with the Sensors for memory included.

share|improve this answer
Good thought! I believe the configs were the same, I will confirm that. How did you get the above list? Just cat config.nice or is there a way to get it from a compiled snmpd binary? – Josh Apr 30 '13 at 21:56
net-snmp-config --configure-options will show the parameters – Alessandro Meyer Apr 30 '13 at 21:57
Thanks! Sure enough, that reports --without-kmem-usage as an option. I'll play around with ./configure and see if I can't find a way to fix that. – Josh May 1 '13 at 0:08

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.