coontie has asked for the wisdom of the Perl Monks concerning the following question:

Hi. I've an N number of xml config files, detailing relationships between N software routers (Tibco RVRD, if you know). The number of routers is about 50. Each file lists the neighbors that the router is bound to.

What I'd like to do is to generate either a jpeg or a png or some visual representation of these routers. Can you guys think of a good way of doing this? Thank you!

  • Comment on generating a router map from xml configs

Replies are listed 'Best First'.
Re: generating a router map from xml configs
by Joost (Canon) on Dec 06, 2006 at 19:29 UTC
      You are right GraphViz does exactly what I need!!! Thank you!
Re: generating a router map from xml configs
by GrandFather (Saint) on Dec 06, 2006 at 19:57 UTC

    I had a similar problem in How to print/draw a network graph and was recommended GraphViz. GraphViz looked over the top for my application to start with, but my final graphing solution using was pretty clean: Re^2: How to print/draw a network graph. Not sure why I ended up using command line. Possibly I had trouble installing the module under Windows. However it installs with ppm now.


    DWIM is Perl's answer to Gödel
Re: generating a router map from xml configs
by zentara (Cardinal) on Dec 06, 2006 at 21:50 UTC
    I was just looking at the great gnuplot program, and saw how they are using it to take nodes from GPS data, to create XML files of latitude and longitude, and then feed that to gnuplot. See maps with gnuplot

    I'm sure the learning curve is easier with Graph::Viz, but gnuplot is worth looking at. You could set up a world map of latitudes and longitudes of each net node and plot it. Gnuplot can output svg too, which is a nice feature.

    P.S. If you want to, you can process that huge planet.osm file with PerlSax.


    I'm not really a human, but I play one on earth. Cogito ergo sum a bum