On Fri, Sep 09, 2011 at 01:48:59PM +0200, Ruben Laban wrote:
I have also some scripts that took 'show ospf state' output and expected network description and converts that to the SVG image with reachable, broken and unreachable links differentiated by color, but it is not really finished.
I'm currently working on something similar: a perl script that also parses 'show ospf state' and uses graphviz/neato to turn it into a nice diagram. Annotating different kinds of links (vlan, tunnel, healty, broken, etc) is still on my todo list as well. What do you use to generate the SVG? As of all layout engines I've tried, none really manages to create clean graphs for our OSPF topology (currently about 15-20 nodes).
I experimented with graphviz and cannot get any non-ugly results from that (and there is mentioned problem with stability of the result). Perhaps if the source graph will be strongly annotated (like position hints and edge length hints), it would produce better results, i don't know. I finally settled with positioning nodes by hand and keeping their coordinates as annotations, then SVG is generated by a simple awk script. It would be nice to be able to position nodes interactively by some Javascript/svg webapp, but web development is not my piece of cake. Usually just the grid-fitting is enough to draw nicely looking graphs. The script (and some example) data is attached. You could try it. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."