Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) Standard preamble: ========================================================================
NAMEmrtg - What is MRTG ?
DESCRIPTIONThe Multi Router Traffic Grapher (
MRTG) is a tool to monitor the traffic load on network links.
PNGimages which provide a
LIVEvisual representation of this traffic. Check www.stat.ee.ethz.ch/mrtg to see what it does.
oss.oetiker.ch/mrtg for all the details about mrtg.
MRTGworks on mostUNIXplatforms and WindowsNT.
MRTGis written in Perl and comes with full source.
- Portable SNMP
MRTGUses a highly portableSNMPimplementation written entirely in Perl (thanks to Simon Leinen). There is no need to install any externalSNMPpackage.
- SNMPv2c support
MRTGcan read the new SNMPv2c 64bit counters. No more counter wrapping.
- Reliable Interface Identification
Router interfaces can be identified by IPaddress, description and ethernet address in addition to the normal interface number.
- Constant size Logfiles
MRTG's logfiles doNOTgrow thanks to the use of a unique data consolidation algorithm.
- Automatic Configuration
MRTGcomes with a set of configuration tools which make configuration and setup very simple.
- Time critical routines are written in C (thanks to the initiative of Dave Rand my Co-Author).
- GIFfree Graphics
Graphics are generated directly in PNGformat using theGDlibrary by Thomas Boutell.
The look of the webpages produced by MRTGis highly configurable.
MRTGhas built-in hooks for using RRDtool. If you are strapped for performance this may help.
MRTGconsists of a Perl script which uses
SNMPto read the traffic counters of your routers and a fast C program which logs the traffic data and creates beautiful graphs representing the traffic on the monitored network connection. These graphs are embedded into webpages which can be viewed from any modern Web-browser.
In addition to a detailed daily view,
MRTGalso creates visual representations of the traffic seen during the last seven days, the last five weeks and the last twelve months. This is possible because
MRTGkeeps a log of all the data it has pulled from the router. This log is automatically consolidated so that it does not grow over time, but still contains all the relevant data for all the traffic seen over the last two years. This is all performed in an efficient manner. Therefore you can monitor 200 or more network links from any halfway decent
MRTGis not limited to monitoring traffic, though. It is possible to monitor any
SNMPvariable you choose. You can even use an external program to gather the data which should be monitored via
MRTG. People are using
MRTG, to monitor things such as System Load, Login Sessions, Modem availability and more.
MRTGeven allows you to accumulate two or more data sources into a single graph.
HISTORYIn 1994 I was working at a site where we had one 64kbit line to the outside world. Obviously, everybody was interested in knowing how the link was performing. So I wrote a quick hack which created a constantly updated graph on the web that showed the traffic load on our Internet link. This eventually evolved into a rather configurable Perl script called
MRTG-1.0 which I released in spring 1995. After a few updates, I left my job at
DMUto start work at the Swiss Federal Institute of Technology. Due to lack of time I had to put
MRTGaside. One day in January of 1996, I received email from Dave Rand asking if I had any ideas why
MRTGwas so slow. Actually, I did.
MRTG's programming was not very efficient and it was written entirely in Perl. After a week or so, Dave wrote back to me and said he had tried what I had suggested for improving
MRTG's speed. Since the changes did not help much, he had decided to rewrite the time-critical sections of
MRTGin C. The code was attached to his email. His tool increased the speed of
MRTGby a factor of 40! This got me out of my '
MRTGignorance' and I started to spend my spare time developing of
MRTG-2development had begun I started to give beta copies to interested parties. In return I got many feature patches, a lot of user feedback and bug fixes. The product you are getting now wouldn't be in this state if it hadn't been for the great contributions and support I received from of many people. I would like to take this opportunity to thank them all. (See the files
CHANGESfor a long list of folk people who helped to make
MRTGwhat it is today.)
Command-lineMrtg is also the name of the script you have to run to poll data and generate the graphs. Most configuration is set through the configuration file; some command-line options exist all the same.
- --user username and --group groupname
- Run as the given user and/or group. (Unix Only)
- --lock-file filename
- Use an alternate lock-file (the default is to use the configuration-file appended with "_l").
- --confcache-file filename
- Use an alternate confcache-file (the default is to use the configuration-file appended with ".ok")
- --logging filename|eventlog
If this is set to writable filename, all output from mrtg (warnings, debug messages, errors)
will go to filename. If you are running on Win32 you can specify eventlog instead of a filename
which will send all error to the windows event log.
NOTE:Note, there is no MessageDLLfor mrtg. This has the side effect that the windows event logger will display a nice message with every entry in the event log, complaing about the fact that mrtg has no message dll. If any of the Windows folks want to contribute one, they are welcome.
Put MRTGinto the background, running as a daemon. This works the same way as the config file option, but the switch is required for properFHSoperation (because /var/run is writable only by root)
Configure all mrtg paths to conform to the FHSspecification; www.pathname.com/fhs
- Only check the cfg file for errors. Do not do anything.
- Define the name and path of the pid file for mrtg running as a daemon
- Only update the logfile, do not produce graphics or html pages
Enable debug options. The argument of the debug option is a comma separated list of debug values:
cfg - watch the config file reading dir - directory mangeling base - basic program flow tarp - target parser snpo - snmp polling fork - forking view time - some timing info log - logging of data via rateup or rrdtool
READ ONLearn more about
MRTGby going to the mrtg home page on: oss.oetiker.ch/mrtg