Blob Blame History Raw
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
.    if \nF \{
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "MRTG 1"
.TH MRTG 1 "2018-07-13" "2.17.7" "mrtg"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
mrtg \- What is MRTG ?
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The Multi Router Traffic Grapher (\s-1MRTG\s0) is a tool to monitor
the traffic load on network links.  \s-1MRTG\s0 generates \s-1HTML\s0 pages
containing \s-1PNG\s0 images which provide a \s-1LIVE\s0 visual representation of
this traffic.
.PP
Go to http://oss.oetiker.ch/mrtg for all the details about mrtg.
.SH "HIGHLIGHTS"
.IX Header "HIGHLIGHTS"
.IP "Portable" 4
.IX Item "Portable"
\&\s-1MRTG\s0 works on most \s-1UNIX\s0 platforms and Windows \s-1NT.\s0
.IP "Perl" 4
.IX Item "Perl"
\&\s-1MRTG\s0 is written in Perl and comes with full source.
.IP "Portable \s-1SNMP\s0" 4
.IX Item "Portable SNMP"
\&\s-1MRTG\s0 Uses a highly portable \s-1SNMP\s0 implementation written entirely in
Perl (thanks to Simon Leinen). There is no need to install any
external \s-1SNMP\s0 package.
.IP "SNMPv2c support" 4
.IX Item "SNMPv2c support"
\&\s-1MRTG\s0 can read the new SNMPv2c 64bit counters. No more counter wrapping.
.IP "Reliable Interface Identification" 4
.IX Item "Reliable Interface Identification"
Router interfaces can be identified by \s-1IP\s0 address, description and
ethernet address in addition to the normal interface number.
.IP "Constant size Logfiles" 4
.IX Item "Constant size Logfiles"
\&\s-1MRTG\s0's logfiles do \s-1NOT\s0 grow thanks to the use of a unique data
consolidation algorithm.
.IP "Automatic Configuration" 4
.IX Item "Automatic Configuration"
\&\s-1MRTG\s0 comes with a set of configuration tools which make configuration and
setup very simple.
.IP "Performance" 4
.IX Item "Performance"
Time critical routines are written in C (thanks to the initiative
of Dave Rand my Co-Author).
.IP "\s-1GIF\s0 free Graphics" 4
.IX Item "GIF free Graphics"
Graphics are generated directly in \s-1PNG\s0 format using the
\&\s-1GD\s0 library by Thomas Boutell.
.IP "Customizability" 4
.IX Item "Customizability"
The look of the webpages produced by \s-1MRTG\s0 is highly configurable.
.IP "RRDtool" 4
.IX Item "RRDtool"
\&\s-1MRTG\s0 has built-in hooks for using RRDtool. If you are strapped for
performance this may help.
.SH "DETAILS"
.IX Header "DETAILS"
\&\s-1MRTG\s0 consists of a Perl script which uses \s-1SNMP\s0 to 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.
.PP
In addition to a detailed daily view, \s-1MRTG\s0 also 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
\&\s-1MRTG\s0 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 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 \s-1UNIX\s0 box.
.PP
\&\s-1MRTG\s0 is not limited to monitoring traffic, though.  It is possible to
monitor any \s-1SNMP\s0 variable you choose. You can even use an
external program to gather the data which should be monitored via
\&\s-1MRTG.\s0 People are using \s-1MRTG,\s0 to monitor things such as System Load,
Login Sessions, Modem availability and more. \s-1MRTG\s0 even allows you to
accumulate two or more data sources into a single graph.
.SH "HISTORY"
.IX Header "HISTORY"
In 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 \s-1MRTG\-1.0\s0 which I released in spring
1995. After a few updates, I left my job at \s-1DMU\s0 to start work at the
Swiss Federal Institute of Technology. Due to lack of time I had to
put \s-1MRTG\s0 aside. One day in January of 1996, I received email from
Dave Rand asking if I had any ideas why \s-1MRTG\s0 was so slow. Actually, I
did. \s-1MRTG\s0'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 \s-1MRTG\s0's speed. Since
the changes did not help much, he had decided to rewrite the
time-critical sections of \s-1MRTG\s0 in C. The code was attached to his
email. His tool increased the speed of \s-1MRTG\s0 by a factor of 40! This
got me out of my '\s-1MRTG\s0 ignorance' and I started to spend my spare time
developing of \s-1MRTG\-2.\s0
.PP
Soon after \s-1MRTG\-2\s0 development 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 \s-1CHANGES\s0 for a
long list of folk people who helped to make \s-1MRTG\s0 what it is today.)
.SH "Command-line"
.IX Header "Command-line"
Mrtg 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.
.IP "\fB\-\-user\fR \fIusername\fR  and \fB\-\-group\fR \fIgroupname\fR" 4
.IX Item "--user username and --group groupname"
Run as the given user and/or group. (Unix Only)
.IP "\fB\-\-lock\-file\fR \fIfilename\fR" 4
.IX Item "--lock-file filename"
Use an alternate lock-file (the default is to use the configuration-file
appended with \f(CW\*(C`_l\*(C'\fR).
.IP "\fB\-\-confcache\-file\fR \fIfilename\fR" 4
.IX Item "--confcache-file filename"
Use an alternate confcache-file (the default is to use the configuration-file appended with \f(CW\*(C`.ok\*(C'\fR)
.IP "\fB\-\-logging\fR \fIfilename\fR|\fBeventlog\fR" 4
.IX Item "--logging filename|eventlog"
If this is set to writable filename, all output from mrtg (warnings, debug messages, errors)
will go to \fIfilename\fR. If you are running on Win32 you can specify \fBeventlog\fR instead of a filename
which will send all error to the windows event log.
.Sp
\&\fB\s-1NOTE:\s0\fRNote, there is no Message \s-1DLL\s0 for 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.
.IP "\fB\-\-daemon\fR" 4
.IX Item "--daemon"
Put \s-1MRTG\s0 into the background, running as a daemon. This works the same way as
the config file option, but the switch is required for proper \s-1FHS\s0 operation  
(because /var/run is writable only by root)
.IP "\fB\-\-fhs\fR" 4
.IX Item "--fhs"
Configure all mrtg paths to conform to the \s-1FHS\s0 specification
<http://www.pathname.com/fhs/>. The following default values are assumed:
.Sp
.Vb 4
\& confcachefile \- /var/cache/mrtg/mrtg.ok
\& pid\-file      \- /var/run/mrtg.pid
\& lock\-file     \- /var/cache/mrtg/mrtg.lck
\& log\-file      \- /var/log/mrtg.log
.Ve
.IP "\fB\-\-check\fR" 4
.IX Item "--check"
Only check the cfg file for errors. Do not do anything.
.IP "\fB\-\-pid\-file=s\fR" 4
.IX Item "--pid-file=s"
Define the name and path of the pid file for mrtg running as a daemon
.IP "\fB\-\-log\-only\fR" 4
.IX Item "--log-only"
Only update the logfile, do not produce graphics or html pages
.IP "\fB\-\-debug=s\fR" 4
.IX Item "--debug=s"
Enable debug options. The argument of the debug option is a comma separated list of debug values:
.Sp
.Vb 8
\& 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
.Ve
.Sp
Example:
.Sp
.Vb 1
\& \-\-debug="cfg,snpo"
.Ve
.SH "READ ON"
.IX Header "READ ON"
Learn more about \s-1MRTG\s0 by going to the mrtg home page on:
http://oss.oetiker.ch/mrtg
.SH "AUTHOR"
.IX Header "AUTHOR"
Tobias Oetiker <tobi@oetiker.ch> and many contributors