East of the Sun, West of the Moon

2005/8/29

SNMP on OS X

Filed under: OS X — Erwin @ 3:50 am

I was wondering if I could run an SNMP serveragent on my OS X desktop machine, for additional statistics fun. I figured that the worst case scenario would be that I’d have to download the source and run it, but was hoping for better.

Turns out that the snmpd software package was already there, waiting to be used. Imagine that! All I had to do was adjust /etc/hostconfig to include a line like this:

SNMPSERVER=-YES-

And then create a configuration file in /usr/share/snmp/snmpd.conf:

rocommunity mypubliccommunity 192.168.2.0/24

syslocation "The Office"

That’s pretty much the bare minimum. Disclaimer: I haven’t actually rebooted yet to verify that the change in /etc/hostconfig does what it’s supposed to, but it looks promising.

So far I’m tracking the CPU load and the disk usage and I’m looking to see if I can get the AirPort usage data as well, somewhere.

Update: Yup, the change to /etc/hostconfig did the trick. Still no idea how to convince snmpd to show me traffic statistics for en0 (wired network) and en1 (wireless network).

Powered by WordPress