Load-map implementation
The idea to this code came from the
MRTG
package, but it is completely reimplemented, adding a few new features
of my own:
- The width of the lines vary with the interface speed (fetched
from the data base), the ranges are configurable.
- Each port has two separate parts: "in" and "out", where the
inbound and outbound values are shown.
- The overlaid imagemap uses the names given in the drawing as
components in dynmamically-constructed URLs pointing to the
relevant port load plots.
More information on how to set up the drawing
file is available.
The code consists of the following major elements:
- Code reading in and storing the relevant data from the FIG
file which defines the drawing.
- Code to actually create the PNG image, using the Perl GD
library, based on the data read from the FIG file and data from
the report being visualized. While the PNG image is
constructed, the client-side image map to be used is also
constructed.
- Code to emit the surrounding HTML code, as well as taking
care of HTTP (Expires header etc.).
he@nordu.net
Last modified: Thu Jun 26 12:49:16 MET DST 1997