MRTG(1) mrtg MRTG(1)
mrtg - What is MRTG
The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network-
links. MRTG generates HTML pages containing GIF images which provide a LIVE visual repre-
sentation of this traffic. Check http://www.stat.ee.ethz.ch/mrtg/ to see what it does.
Go to http://people.ee.ethz.ch/~oetiker/webtools/mrtg for all the details about mrtg.
MRTG is written in Perl and C and works under UNIX and Windows NT. MRTG is being success-
fully used on many sites around the net. Check the MRTG-Site-Map on:
MRTG works on most UNIX platforms and Windows NT.
MRTG is written in perl and comes with full source.
MRTG Uses a highly portable SNMP implementation written entirely in Perl thanks to
Simon Leinen. There is no need to install any external SNMP package.
MRTG can read the new SNMPv2c 64bit counters. No more counter wrapping.
Reliable Interface Identification
Router interfaces can be identified by IP address, Description and Ethernet address in
addition to the normal Interface number.
Constant size Logfiles
MRTG's logfiles do NOT grow. Thanks to the use of a unique data consolidation algo-
MRTG comes with a set configuration tools which make configuration and setup very sim-
Time critical routines are written in C thanks to the initiative of Dave Rand my Co-
GIF free Graphics
Graphics are generated directly in PNG format, using the GD library by Thomas Boutell.
The look of the webpages produced by MRTG is highly configurable.
MRTG has built in hooks for using RRDtool. If you are straped for performance this may
MRTG consists of a Perl script which uses SNMP to read the traffic counters of your
routers and a fast C program which logs the traffic data and creates beautiful graphs rep-
resenting 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, MRTG also creates visual representations of the
traffic seen during the last seven days, the last four weeks and the last twelve months.
This is possible because MRTG keeps 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 con-
tains 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 UNIX box.
MRTG is not limited to monitoring traffic though, it is possible to monitor any SNMP vari-
able 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. MRTG even allows you to accumulate two or more data
sources into a single graph.
In 1994 I was working at a site where we had one 64kbit line to the outside world. Obvi-
ously 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, showing 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 DMU, to
start work at the Swiss Federal Institute of Technology. Due to lack of time I had to put
MRTG aside. One day in January of 1996, I received email from Dave Rand asking if I had
any ideas why MRTG was 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 MRTG in C. The code was
attached to his email. His tool increased the speed of MRTG by a factor of 40! This got me
out of my 'MRTG ignorance' and I started to spend my spare time developing of MRTG-2.
Soon after MRTG-2 development had begun I started to give beta copies to interested par-
ties. In return I got many feature patches, a lot of user feedback and bug fixes. The
product you are getting now is wouldnt be in this state if it hadn't been for the great
contributions and suport I received from of many people. I would like to take this oppor-
tunity to thank them all. (See the files CHANGES for a long list of folk people who helped
to make MRTG what it is today)
Learn more about MRTG by going to the mrtg home page on: http://peo-
Tobias Oetiker <email@example.com> and many contributors
3rd Berkeley Distribution 2.9.17 MRTG(1)