181
The Windows 2000 version has received a slight face-lift but seems to be the same basic program. perfmon can be particularly useful if you arent sure whether you have a host problem or a network
problem. Both netmon and perfmon are described in the Windows help files as well as several books described in
Appendix B .
8.6.1 ntop, mrtg, and cricket on Windows
All three major packages described in this chapter—ntop, mrtg, and cricket—are available for Windows systems.
The developers of ntop have provided you with two choices. You can compile it yourself for free. Both the Unix and Windows versions share the same source tree. Or, if you cant easily compile it, you
can buy a precompiled binary directly from them. Since ntop is basically a point-monitoring tool, youll likely want to run it on multiple machines if you have a switched network or multiple
subnetworks.
Since mrtg and cricket are primarily written in Perl, it is not surprising that they will run under Windows. Youll find mrtg fairly straightforward to set up. While cricket is said to work, at the time
this was written there were no published directions on how to set it up, and the Unix directions dont generalize well.
Setting up mrtg for Windows is not that different from setting it up under Unix. To get mrtg running, youll need to download a copy of mrtg with the binary for rateup. This was included with the copy of
mrtg I downloaded, but the mrtg web page for NT has a separate link should you need it. You will need a copy of Perl along with anything else you may need to get Perl running. The mrtg site has links
to the Active Perl site. Installing Active Perl requires an updated version of the Windows Installer, available at their site. Youll need to provide some mechanism for running mrtg on a regular basis. The
file fiveminute.zip provided a program to add mrtg to the Windows NT scheduler. Finally, youll want to provide some mechanism to view the output from mrtg. This could be a web server or, at a
minimum, a web browser.
TE AM
FL Y
Team-Fly
®
182
Once you have unpacked everything, youll need to edit the mrtg script so that NT rather than Unix is the operating system. This amounts to commenting out the fourth line of the script and uncommenting
the fifth:
main::OS = UNIX; main::OS = NT;
Also, make sure rateup is in the same directory as mrtg. Creating the configuration file and running the script is basically the same as with the Unix version.
Youll want to run cfgmaker and indexmaker. And, as with the Unix version, youll need to edit the configuration file to set WorkDir :. You will need to invoke Perl explicitly and use explicit paths with
these scripts. For example, here are the commands to run indexmaker and mrtg on my system:
D:\mrtg\runperl d:\mrtg\run\indexmaker d:\mrtg\run\mrtg.cfg d:\apache\htdocs\mrtg
D:\mrtg\runperl d:\mrtg\run\mrtg d:\mrtg\run\mrtg.cfg
On my system, D:\mrtg\run is the directory where mrtg is installed and D:\apache\htdocs\mrtg is where the output is put so it can be accessed by the web server.
Finally, youll need to make some provision to run mrtg periodically. As noted, you can use supplied code to add it to the scheduler. Alternately, you can edit the configuration file to have it run as a
daemon. For example, you could add the following to your configuration file:
RunAsDaemon: yes Interval: 5
Youll want to add mrtg to the startup group so that it will be run automatically each time the system is rebooted.
8.6.2 getif revisited