Install Perl and Mrtg and modify MRTG for windows traffic monitoring

Source: Internet
Author: User
Tags install perl mrtg

Mrtg (Multi Router Traffic Grapher, MRTG) is a tool software used to monitor network link Traffic load. It obtains device Traffic information through the snmp protocol, the traffic load is displayed to the user in HTML document format that contains PNG format, and the traffic load is displayed in a very intuitive way. The following describes how to install Perl and Mrtg for MRTG windows traffic monitoring.

Install Perl and Mrtg for MRTG for windows traffic monitoring


If you have already installed WebalizerNT, you should be familiar with decompression, installation, and PATH setting.... Here is a simple description.

The first step is to install windowsinstaller, which is to directly run twice on the displayed instmsi.exe. After installation, install the ActivePerl-5.6.0.613 in the same way.

During installation, Perl automatically adds the PATH environment variable settings, automatically sets the application relevance, and sets CGI settings on IIS or PWSServer, we don't need to worry about these jobs. (If you have an old version, you will be tired .)


After the MRTG main program is unlocked, it is placed in the c: \ mrtg directory, where the run directory contains several main programs and related configuration files of mrtg. Since these programs are Perl programs, the execution method is to run commands in the Command column:


C: \> perlmrtgmrtg.cfg54ne.com

You can also rename this file as mrtg. pl to directly execute it twice in Windows. The same applies to other programs.

 
Modify the Mrtg main program for MRTG windows traffic monitoring


Now let's modify the MRTG main program so that it can be executed in Windows. First, we will discuss how to write Perl programs in Windows.

Perl only accepts UNIX plain text formats, so line breaks are different from Windows. In UNIX, pressing Enter to wrap the line will generate the character with the inner code 0A (that is, the \ n character when writing the program ), however, in Windows, pressing Enter will generate the 0A and 0D characters (that is, the \ n \ r string when writing the program ). For this reason, do not press Enter when writing a Perl program. In addition, when writing a Perl program, do not use NotePad to write it, because it does not know that 0A is also the meaning of line feed. Generally we will use WordPad to write it. The following is a comparison between the two. 54ne.com


Of course, if you have better tools, such as UtraEdit. It is best to write a Perl program.

Generally, when writing a Perl program, the first line needs to specify the PATH of the Perl program. However, in Windows, this work is already done by the PATH environment variable, so the first line only needs to write #! Perl is enough. Of course, if you do not modify it, it can also be executed, but it is easy to cause misunderstanding. The MRTG main program must be modified to display Chinese characters, and the following variable settings: feedom.net

$ Main: OS = 'unix ';
# $ Main: OS = 'nt ';
# $ Main: OS = 'vps ';

Change

# $ Main: OS = 'unix ';
$ Main: OS = 'nt ';
# $ Main: OS = 'vps ';


If your main program is a version I have modified, you do not need to change it. I have changed it to the Chinese version and can use it directly.


Article Reprinted from network management: http://www.bitscn.com/wb/system/200609/76663.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.