Novell is now a part of Micro Focus

Measuring Traffic Flow with MRTG

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 22 Feb 2002

NOTE: Cool reader David M. gently pointed out that we had misspelled the MRTG acronym in this article, so we've corrected it. Sorry for any confusion this might have caused. Thanks for the heads up, David.

If you're looking for a way to keep track of the traffic on your routers, MRTG is definitely worth a look. It's our favorite kind of thing: it works, it's field-hardened, and it's free.

Caterina Luppi, Novell sysop and a member of our Advisory Board, offers this recommendation:

"GREAT program. I tend to only recommend free packages, unless there is no alternative. MRTG is free and extremely powerful. I am sure you will like it!"

OPEN CALL: If you've tried MRTG and want to share your experience with it (good or bad), e-mail us at Or if you are using another tool to do this job, we'd like to hear what you're using and how it works.


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 representing 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 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 UNIX box.

MRTG is not limited to monitoring traffic though, it is possible to monitor any SNMP variable 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.

Q&A about this Article

Sakthi wrote: I went to download MRTG. The information on that page says that it is for UNIX/Windows OS. My NM3.6 server runs (obviously) on NW5.1. Which version of MRTG should I use? UNIX version? Win32 version?

Cat says: Well, we don't really provide support for MRGT, but the version of OS to use with it is independent from the operating system and devices you want to monitor. MRTG is a package that you can install on a Windows (NT) or on a Linux machine, and you can configure it to query NetWare servers, NT servers, Linux machines, routers, switches etc. The choice of operating system you want to run MRTG on should only depend on your knowledge of that OS. for instance, if you never worked on a Linux machine, don't plan to install MRTG on Linux, but rather opt for NT.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates