📄 manual.html
字号:
the changes did not help much, he had decided to rewrite thetime-critical sections of MRTG in C. The code was attached to hisemail. His tool increased the speed of MRTG by a factor of 40! Thisgot me out of my 'MRTG ignorance' and I started to spend my spare timedeveloping of MRTG-2.</P><P>Soon after MRTG-2 development had begun I started to give betacopies to interested parties. In return I got many feature patches, alot of user feedback and bug fixes. The product you are getting now isthe result of a wonderful collaboration of many people. I would liketo take this opportunity to thank them all. (See the files CHANGES for along list of friendly people who helped to make MRTG what it is today)</P></MULTICOL></TD></TR></TABLE><TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=476><TR><TD><A NAME="RELE"></A><TABLE WIDTH="100%" BGCOLOR=silver CELLSPACING=0 CELLPADDING=4><TR><TD><FONT COLOR=black SIZE="+2"><B>Release Notes</B></FONT></TD></TR></TABLE><P>Check the latest release notes by going to the mrtg<A HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/CHANGES">CHANGES</A> file.</P></TD></TR></TABLE><TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=476><TR><TD><A NAME="INST"></A><TABLE WIDTH="100%" BGCOLOR=silver CELLSPACING=0 CELLPADDING=4><TR><TD><FONT COLOR=black SIZE="+2"><B>Getting and Installing MRTG on a UNIX system</B></FONT></TD></TR></TABLE><OL> <LI><P>Get the latest Version of MRTG from:<BR> <A HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/" >http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/</A></P> </LI> <LI><P>Get and compile the GD library by Thomas Boutell:<BR> <A HREF="http://www.boutell.com">www.boutell.com</A>. Unless you know what you are doing, make sure you build libgd, zlib and libpng as static libraries. There are detailed instructions in the README file which comes int the MRTG archive.</P> </LI> <LI><P>Make sure you have Perl Version 5.004_4 or later on your system:<BR> <A HREF="http://www.perl.com/perl/info/software.html" >http://www.perl.com/perl/info/software.html</A></P> </LI> <LI><P>type <TT>./configure</TT> this will prepare MRTG for your system. if something is missing, configure will tell you what todo about it. (Again, see the README file for some more on this.) </P></LI> <LI><P>run <TT>make</TT> to build the rateup executable and edit the perl path in mrtg and its companion tools.</P></LI> <LI><P>Decide where MRTG should store the webpages it creates. Copy the <B><TT>images/mrtg*.png</TT></B> files into this directory. They will be referenced in the generated webpages.</P> </LI> <LI><P>The <TT>run</TT> directory contains all the files, MRTG needs to operate. This directory can be anywhere because MRTG will find its location upon startup.</P> </LI> <LI><P>Now create your personal <B><TT>mrtg.cfg</TT></B> file. You can find the documentation about this in the file <B><TT><A HREF="config.html">config.html</a></TT></B> See the Configuration hints section for some further help. The difficult part in creating the configuration file is getting your router-port assignment correct. To help you with this, the <B><TT>cfgmaker</TT></B> tool will generate all the router specific parts of your configuration file. <BLOCKQUOTE><B><TT> cfgmaker <community>@<router-host-name or IP></TT></B> </BLOCKQUOTE> If you don't know the community of your router, try <B><TT>public</TT></B> as community name. When using cfgmaker, make sure to add the <TT>WorkDir:</TT> parameter to the resulting config file.</P> </LI> <LI><P>Try to start MRTG. Type <B><TT>./mrtg mrtg.cfg</TT></B> on the command line, while you are in your MRTG run directory. MRTG will now parse your configuration file, and complain if you have introduced any unknown keywords or structures. If MRTG is happy with the cfg file, it starts gathering traffic data from the routers you have specified. With this information it will then start the rateup tool which will create a logfile and a traffic graph GIF for each <B>Target</B>. When you start MRTG for the very first time, rateup will complain that it can not find any logfiles and the graphs generated will look rather empty. Just ignore the complaints. If you remove the empty graphs, and run MRTG again, rateup will create new graphs which look better.</P> </LI> <LI><P>Integrate MRTG into your crontab. Just add the following line to your crontab file to have MRTG run every 5 minutes (The line is broken for readability only. Replace the backslash in the first line with the second line): <P> <B><TT>0,5,10,15,20,25,30,35,40,45,50,55 * * * * \<BR> <mrtg-bin>/mrtg <path to mrtg-cfg>/mrtg.cfg</TT></B> </P> </LI></OL></TD></TR></TABLE><TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=476><TR><TD><A NAME="TIPS"></A><TABLE WIDTH="100%" BGCOLOR=silver CELLSPACING=0 CELLPADDING=4><TR><TD><FONT COLOR=black SIZE="+2"><B>Configuration Tips</B></FONT></TD></TR></TABLE><UL> <LI><P>If you are monitoring a number of links, you might want to create an overview page. For our own site I have created the <B><TT>indexmaker</TT></B> script, which you can use to create a html page containing hrefs that point to your individual traffic statistics pages. Note, that you need to edit this script for your purposes. The script you got, includes our Universities Logo (http://www.ee.ethz.ch/eth.199x32.gif) into the page. <P> <TT><B>indexmaker <mrtg.cfg> <regexp for router-names></B></TT> </P> </LI> <LI><P>If you are monitoring many targets, use the special target names '^' and '$' to prepend or append text to any of the Keywords in the sections below. Note that the definition of the '^' and '$' targets are position dependant. They always influence the lines below in the cfg file. The special target '_' for specifying defaults may come handy as well.</P> </LI> <LI> <P> Since MRTG updates it's graphs every 5 minutes, you may experience problems with proxy caches and local Netscape browser caches. Sometimes these caches will return the old cached graphics instead of the real and updated versions from the webserver. </P> <P>If you are running the apache webserver, you can use the <B>WriteExpire</B> Keyword in the mrtg.cfg file. With this, mrtg will create *.meta files for each gif and html page. These files will contain 'Expire' headers which the Apache webserver can ship out together with the gif and html pages (Use to <B>MetaDir</B> keyword in the apache config file to enable this). With the information from the expire headers, Netscape and all the proxy caches will know when they have to fetch a new version of the file from your website and when they can use their cached version.</P> </LI> <LI> <P>Although MRTG's primary use is traffic monitoring, you can observe any SNMP variable you want. People are using it to monitor ModemBanks, ServerLoad, ErrorRates on Interfaces and many other things. If you are using MRTG for something other than traffic monitoring, please send me a short blurb to include here. Best would be with a sample URL and some hints about how you have configured MRTG ... Check the <A HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/users.html" >MRTG-Site-Map</A> for other peoples work related to this.</B></P></P> </LI> <LI> <P>Some monitored devices such as routers may have cards which can be moved around inside. When this happens data that once was read from one interface index now appears on a new index. This can confuse data collection. Often MRTG will notice the change and report the following: </P> <P> <PRE> ------------------------------------------------------------------- Warning: There is something wrong with Target 1.2.3.4 * Its ifDescr used to be etc4p4 * Now it is etc3p4 I will not update this graph for the moment. Maybe your Router has changed the port to interface mapping. This can happen when new Interfaces are added to the router or when it is rebooted. You should alter your 1.2.3.4.cfg file to fix the mapping and then remove the offending lines from your 1.2.3.4.ok file. Mrtg will then assume that everything is OK and create new entries representing the new matching. -------------------------------------------------------------------- </PRE> </P> <P> You can help prevent this problem by using either IP addresses or Physcial Address instead of the default Interface Indices. The program <TT>cfgmaker_phys</TT> can convert your <TT>*.cfg</TT> files to use Physical Addresses. See <TT>config.txt</TT> for more information. </P> </LI> </UL></TD></TR></TABLE><TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=476><TR><TD><A NAME="FAQ"></A><TABLE WIDTH="100%" BGCOLOR=silver CELLSPACING=0 CELLPADDING=4><TR><TD><FONT COLOR=black SIZE="+2"><B>Frequently Asked Question with Answers</B></FONT></TD></TR></TABLE> <P><I><B>Q:</B> Why is there no "@#$%" (my native language) version ofMRTG.</I><BR> <B>A:</B> Nobody has contributed a "@#$%.pmd" file. Go intothe "translate" directory and create your own translation file. When you arehappy with it send it to me for inclusion with the next mrtg release.</P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -