[NCLUG] dynamic graph on web page

Mike Loseke mike at verinet.com
Fri Sep 22 09:49:43 MDT 2000


Thus spake Daniel Herrington:
> 
> NCLUGers,
> 
> Does anyone know of a canned linux solution (or not-canned) to create
> an up-to-date X-Y graph of some constantly changing data from a file
> and display it whenever someone clicks on a weblink?  I would like to
> be able to set up a little weather station and track the last 24 hour
> period on a web page.
> 
> I'm thinking I could write a perl script to output an xbm file, then
> run it through a converter and have the final image returned as a jpeg
> inside a dynamically-generated webpage, but I'd rather not re-invent
> the wheel if I can help it.

 I use rrdtool (http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/)
to do just exactly this with network traffic for a metric buttload of
WAN and LAN links. The distro includes a perl module and the website
has extensive documentation and examples to help out. rrdtool is going
to be what mrtg3 will be built on - if it ever comes out...

 For my stuff, I'm using perl and SNMP.pm to query routers and switches
for in/out octets then the rrdtool module to update it's little databases
(one per interface for my setup). I then have a cgi that allows a user
to select the link they want to see stats on and they are presented with
current stats (generated also using perl and rrdtool) with the option to
see several sets of historical data. Very very nice. It uses GD (I think)
to output either gif or png.

-- 
   Mike Loseke    | One of life's best joys is putting the little 
 mike at verinet.com | rubber feet on a new piece of networking gear.



More information about the NCLUG mailing list