|
Packit |
667938 |
=head1 NAME
|
|
Packit |
667938 |
|
|
Packit |
667938 |
mrtg - What is MRTG ?
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 DESCRIPTION
|
|
Packit |
667938 |
|
|
Packit |
667938 |
The Multi Router Traffic Grapher (MRTG) is a tool to monitor
|
|
Packit |
667938 |
the traffic load on network links. MRTG generates HTML pages
|
|
Packit |
667938 |
containing PNG images which provide a LIVE visual representation of
|
|
Packit |
667938 |
this traffic.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Go to http://oss.oetiker.ch/mrtg for all the details about mrtg.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 HIGHLIGHTS
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=over
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item Portable
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG works on most UNIX platforms and Windows NT.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item Perl
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG is written in Perl and comes with full source.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item Portable SNMP
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG Uses a highly portable SNMP implementation written entirely in
|
|
Packit |
667938 |
Perl (thanks to Simon Leinen). There is no need to install any
|
|
Packit |
667938 |
external SNMP package.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item SNMPv2c support
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG can read the new SNMPv2c 64bit counters. No more counter wrapping.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item Reliable Interface Identification
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Router interfaces can be identified by IP address, description and
|
|
Packit |
667938 |
ethernet address in addition to the normal interface number.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item Constant size Logfiles
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG's logfiles do NOT grow thanks to the use of a unique data
|
|
Packit |
667938 |
consolidation algorithm.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item Automatic Configuration
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG comes with a set of configuration tools which make configuration and
|
|
Packit |
667938 |
setup very simple.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item Performance
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Time critical routines are written in C (thanks to the initiative
|
|
Packit |
667938 |
of Dave Rand my Co-Author).
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item GIF free Graphics
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Graphics are generated directly in PNG format using the
|
|
Packit |
667938 |
GD library by Thomas Boutell.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item Customizability
|
|
Packit |
667938 |
|
|
Packit |
667938 |
The look of the webpages produced by MRTG is highly configurable.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item RRDtool
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG has built-in hooks for using RRDtool. If you are strapped for
|
|
Packit |
667938 |
performance this may help.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=back
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 DETAILS
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG consists of a Perl script which uses SNMP to read the traffic
|
|
Packit |
667938 |
counters of your routers and a fast C program which logs the traffic
|
|
Packit |
667938 |
data and creates beautiful graphs representing the traffic on the
|
|
Packit |
667938 |
monitored network connection. These graphs are embedded into webpages
|
|
Packit |
667938 |
which can be viewed from any modern Web-browser.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
In addition to a detailed daily view, MRTG also creates visual
|
|
Packit |
667938 |
representations of the traffic seen during the last seven days, the
|
|
Packit |
667938 |
last five weeks and the last twelve months. This is possible because
|
|
Packit |
667938 |
MRTG keeps a log of all the data it has pulled from the router. This
|
|
Packit |
667938 |
log is automatically consolidated so that it does not grow over time,
|
|
Packit |
667938 |
but still contains all the relevant data for all the traffic seen over
|
|
Packit |
667938 |
the last two years. This is all performed in an efficient manner.
|
|
Packit |
667938 |
Therefore you can monitor 200 or more network links from any halfway
|
|
Packit |
667938 |
decent UNIX box.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG is not limited to monitoring traffic, though. It is possible to
|
|
Packit |
667938 |
monitor any SNMP variable you choose. You can even use an
|
|
Packit |
667938 |
external program to gather the data which should be monitored via
|
|
Packit |
667938 |
MRTG. People are using MRTG, to monitor things such as System Load,
|
|
Packit |
667938 |
Login Sessions, Modem availability and more. MRTG even allows you to
|
|
Packit |
667938 |
accumulate two or more data sources into a single graph.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 HISTORY
|
|
Packit |
667938 |
|
|
Packit |
667938 |
In 1994 I was working at a site where we had one
|
|
Packit |
667938 |
64kbit line to the outside world. Obviously, everybody was interested
|
|
Packit |
667938 |
in knowing how the link was performing. So I wrote a quick hack which
|
|
Packit |
667938 |
created a constantly updated graph on the web that showed the traffic
|
|
Packit |
667938 |
load on our Internet link. This eventually evolved into a rather
|
|
Packit |
667938 |
configurable Perl script called MRTG-1.0 which I released in spring
|
|
Packit |
667938 |
1995. After a few updates, I left my job at DMU to start work at the
|
|
Packit |
667938 |
Swiss Federal Institute of Technology. Due to lack of time I had to
|
|
Packit |
667938 |
put MRTG aside. One day in January of 1996, I received email from
|
|
Packit |
667938 |
Dave Rand asking if I had any ideas why MRTG was so slow. Actually, I
|
|
Packit |
667938 |
did. MRTG's programming was not very efficient and it was written
|
|
Packit |
667938 |
entirely in Perl. After a week or so, Dave wrote back to me and said
|
|
Packit |
667938 |
he had tried what I had suggested for improving MRTG's speed. Since
|
|
Packit |
667938 |
the changes did not help much, he had decided to rewrite the
|
|
Packit |
667938 |
time-critical sections of MRTG in C. The code was attached to his
|
|
Packit |
667938 |
email. His tool increased the speed of MRTG by a factor of 40! This
|
|
Packit |
667938 |
got me out of my 'MRTG ignorance' and I started to spend my spare time
|
|
Packit |
667938 |
developing of MRTG-2.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Soon after MRTG-2 development had begun I started to give beta
|
|
Packit |
667938 |
copies to interested parties. In return I got many feature patches, a
|
|
Packit |
667938 |
lot of user feedback and bug fixes. The product you are getting now
|
|
Packit |
667938 |
wouldn't be in this state if it hadn't been for the great contributions
|
|
Packit |
667938 |
and support I received from of many people. I would like
|
|
Packit |
667938 |
to take this opportunity to thank them all. (See the files CHANGES for a
|
|
Packit |
667938 |
long list of folk people who helped to make MRTG what it is today.)
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 Command-line
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Mrtg is also the name of the script you have to run to poll data and
|
|
Packit |
667938 |
generate the graphs. Most configuration is set through the configuration
|
|
Packit |
667938 |
file; some command-line options exist all the same.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=over
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--user> I<username> and B<--group> I<groupname>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Run as the given user and/or group. (Unix Only)
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--lock-file> I<filename>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Use an alternate lock-file (the default is to use the configuration-file
|
|
Packit |
667938 |
appended with C<_l>).
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--confcache-file> I<filename>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Use an alternate confcache-file (the default is to use the configuration-file appended with C<.ok>)
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--logging> I<filename>|B<eventlog>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
If this is set to writable filename, all output from mrtg (warnings, debug messages, errors)
|
|
Packit |
667938 |
will go to I<filename>. If you are running on Win32 you can specify B<eventlog> instead of a filename
|
|
Packit |
667938 |
which will send all error to the windows event log.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
B<NOTE:>Note, there is no Message DLL for mrtg. This has the side effect
|
|
Packit |
667938 |
that the windows event logger will display a nice message with every entry
|
|
Packit |
667938 |
in the event log, complaing about the fact that mrtg has no message dll. If
|
|
Packit |
667938 |
any of the Windows folks want to contribute one, they are welcome.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--daemon>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Put MRTG into the background, running as a daemon. This works the same way as
|
|
Packit |
667938 |
the config file option, but the switch is required for proper FHS operation
|
|
Packit |
667938 |
(because /var/run is writable only by root)
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--fhs>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Configure all mrtg paths to conform to the FHS specification
|
|
Packit |
667938 |
L<http://www.pathname.com/fhs/>. The following default values are assumed:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
confcachefile - /var/cache/mrtg/mrtg.ok
|
|
Packit |
667938 |
pid-file - /var/run/mrtg.pid
|
|
Packit |
667938 |
lock-file - /var/cache/mrtg/mrtg.lck
|
|
Packit |
667938 |
log-file - /var/log/mrtg.log
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--check>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Only check the cfg file for errors. Do not do anything.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--pid-file=s>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Define the name and path of the pid file for mrtg running as a daemon
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--log-only>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Only update the logfile, do not produce graphics or html pages
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<--debug=s>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Enable debug options. The argument of the debug option is a comma separated list of debug values:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
cfg - watch the config file reading
|
|
Packit |
667938 |
dir - directory mangeling
|
|
Packit |
667938 |
base - basic program flow
|
|
Packit |
667938 |
tarp - target parser
|
|
Packit |
667938 |
snpo - snmp polling
|
|
Packit |
667938 |
fork - forking view
|
|
Packit |
667938 |
time - some timing info
|
|
Packit |
667938 |
log - logging of data via rateup or rrdtool
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Example:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
--debug="cfg,snpo"
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=back
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 READ ON
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Learn more about MRTG by going to the mrtg home page on:
|
|
Packit |
667938 |
http://oss.oetiker.ch/mrtg
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 AUTHOR
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Tobias Oetiker E<lt>tobi@oetiker.chE<gt> and many contributors
|