Start SNMP on non-XServe OS X Server

Sep 22, '03 09:18:00AM

Contributed by: DragonMac

This hint is just ment to instruct a user on how to turn SNMP (a brief overview of SNMP is at the end of the hint) on with basic setup info. How to use the CLI to get info is not dealt with ... or you can buy a graphical interface to monitor your Mac. By no standard am I an expert on this; I have been forced to use this method to monitor my server since Apple does not support "Server Monitor" (a great monitoring app) on the G4 on which I installed my server software (I should have bought an XServe; if you want to remote monitor your Mac, read on). So anyway, I had to learn a new thing, not so bad.

Basic setup of SNMP on OS X server:
[client is not the same; Server only in 10.2]

  1. Log in as Root. This is easier so you can edit the hidden files you need to. If you know how to use the sudo command and a unix text editor, feel free.
  2. Use the Go -> Go to Folder command and enter /etc.
  3. In the list of files, find hostconfig and open it.
  4. Under the header # Services, add SNMPSERVER=-YES- below the list of other services, and save the file.
  5. Now open Terminal window and type or paste snmpconf -g basic_setup (you must be root user or use sudo command). Enter man snmpconf first to read about this command if you wish.
  6. Follow the instructions onscreen to set up the basics. This can get very detailed and you can run it again after you read more on SNMP and understand what to enter better.
  7. When you finish, I would restart ... but if you know how to use the CLI to start the process or restart the SNMP process, you can do that instead.
Now you can use SNMP commands from a UNIX terminal on any Mac and get info about the Mac you just set up.

For the Newbie, SNMP is Simple Network Management Protocol, which is used in some cases to manage a PC and more so on the Mac-end to monitor machines. You can get a verity of information like running processes, CPU usage, temperatures and lots more. The information you get depends on two things. Your hardware can supply the information to the system and the MIB (Management Information Base) files installed in your system. All Mac OS X installs include some form of SNMP; you just have to turn it on and use it. For more information, go to www.net-snmp.com and www.dartware.com/net-snmp.

[robg adds: I haven't tested this one, and I'm not sure if it's even possible on Client as opposed to Server -- anyone know for sure?]

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2003091607370562