Machine statistics

Toni Schmidbauer toni at
Tue May 27 01:52:02 PDT 2003

On Mon, May 26, 2003 at 06:03:58PM -0700, Derrick Ryalls wrote:
> I run a game server this is running FBSD4.7, and I decided I wanted to
> have web graphs of various things like bandwidth usage, cpu load, etc.
> I saw MRTG and thought I would give it a try.
> Documentation is kinda poor for setting things up, but most of it refers
> to using SNMP for much of what I want.  After flipping a coin, I
> installed /ports/net/net-snmp.  I ran though a quick config using
> snmpconf, but no matter what options I choose, I cannot get MRTG's
> configmaker to talk to SNMP.  I get the same results whether or not the
> snmpd is running, so something is wrong.  No firewall is in place, so it
> is probably just a configuration/usage issue.  Any ideas on how to
> use/configure SNMP or can someone recommend an easy to use SNMP program
> that works with MRTG?

put this minimal snmpd.conf in /usr/local/share/snmpd.conf:

syslocation     your localtion
syscontact      you at yourdomain.tld
rwcommunity     password
rocommunity     otherpassword
agentaddress    udp:161 at,tcp:161 at

# trap configuration
authtrapenable  1
trapcommunity   otherotherpassword
trapsink        localhost
trap2sink       localhost

then restart snmpd. try the following command:

snmpget localhost otherpassword .

you should get:

host.hrSystem.hrSystemNumUsers.0 = Gauge32: 2

now run:

cfgmaker otherpassword at localhost >> /usr/local/etc/mrtg/mrtg.cfg


indexmaker --title "MRTG at yourhost" --output /usr/local/www/data/mrtg/index.html /usr/local/etc/mrtg/mrtg.cfg

then run "mrtg /usr/local/etc/mrtg/mrtg.cfg" three times, after
the last run there should be no warnings.

hopefully you have apache installed, then direct your browser to

i would also recommend reading the excellent "Essential SNMP".

Behandle die Menschen, als wären sie, was sie sein | toni at stderror dot at
sollten, und du wirst ihnen helfen, zu werden, was | Toni Schmidbauer
sie sein können.  - Johann Wolfgang von Goethe     |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list