The default parameters for olsr-topology-view.pl work but produce a very difficult to follow auto-generated network diagram of the mesh network. I finally spent some time recently to tweak the command-line parameters and came up with parameters that result in a really pleasing, nice to follow and actually (finally!) useful diagram.
I start the script on a Raspberry Pi with this command and parameters:
perl /var/www/html/topo-test.pl --size 60,60 --style 1 --fontsize 7 --bgcolor SteelBlue --fontname Verdana
We currently have about 31 AREDN nodes so viewing on a computer where zooming in and out can be done is quite effective. If printed on a letter-sized sheet it would still be too small but would be okay for something larger like a poster or maybe small poster size. But the background color I chose work for a computer screen but would probably print a bit too dark on paper which means one would have to play with different 'bgcolors' until a better one is found. Although the colors also have to work with the line colors, etc. so it gets a bit tricky. I just printing once, maybe just use the SteelBlue I used.
I would be interested in seeing if others find this useful.
73 - Mike ab4yy
Attached is an example graphic of a run I just made. The .PNG file size was 850 KB but when uploading I see it was resized ("The image was resized to fit within the maximum allowed dimensions of 600x600 pixels"). I don't know if the file will show up or not.
I uploaded a similar one as .PDF. It also have a timestamp in the lower right corner that got added with a script I use.
- Mike ab4yy
I don't know what you mean by "node Id's" as it does show the node names.
Anyway unfortunately, I know little about making changes to the script other than changing the supplied parameters and the descriptions for those are listed in the olsr-topology-view.pl code. We need someone else with real programming experience and understanding to chime in...
I kike the current output but would like to NOT have the diamond boxes (and HNA lines) as that information is not of interest to me. I haven't figured out how to get rid of them.
73 - Mike ab4yy
Node Id's, Node Names I think are the same thing.
Is there a way to modify the olsrd output?
The current output from the olsrd with the "telnet localnode 2004" only contains ip addresses.
ted@X61-1 - $ telnet localnode 2004
-
-
"10.200.15.43" -> "10.128.242.176/28"[label="HNA"];
"10.128.242.176/28"[shape=diamond];
"10.132.56.153" -> "0.0.0.0/0"[label="HNA"];
"0.0.0.0/0"[shape=diamond];
"10.132.56.153" -> "10.67.137.144/28"[label="HNA"];
"10.67.137.144/28"[shape=diamond];
}
My runs show the node names. See attached image. I don't know why we are seeing a difference. I am running my script on a Raspberry Pi on the 10.x.x.x mesh network. - Mike
![](/sites/default/files/sites/default/files/pictures/user830/2018-10-30%2005_25_45-topology.png%20%20-%20%20FastStone%20Image%20Viewer%206.6.png)
Figured it out. In the command line you must have --resolve yes it is no by default.
What does your perl command line look like?
I call the program by running a 1-line script or just manually using the same command string as follows:
perl topo-test.pl --size 60,60 --style 1 --fontsize 7 --bgcolor SteelBlue --fontname Verdana
A long time ago I made slight modifications of the .pl file which is why I hd renamed ot to topo-test.pl. The main change was to have this: on or around line 12: $TOPPATH = "./";
I think there may be another minor change but it shouldn't affect printing the node names as I tried the original "olsr-topology-view.pl" and it did the outut with the node names. (It did however give an error ("sh: 1: display: not found") that I don't get with the 'topo-test.pl' version.
I've uploaded the 'topo-test.pl' version but as you can see, I had to change the name to upload to this forum.
- Mike ab4yy
$TOPPATH is a good one to get away from the /tmp directory.
Making headway. Thanks for your help.
A friend of mine (Thanks Doug!) re-hacked the script I was using and now it works only showing the ovals with the node name and none of the IPs in diamonds. This is exactly what I was looking for. I changed the name of the modified script to: olsr-topology-view-AREDN.pl but for uploading to this post the name got changed again.
I still run the script like this:
perl olsr-topology-view-AREDN.pl --size 60,60 --style 1 --fontsize 7 --bgcolor SteelBlue --fontname Verdana
For me, this closes out my original posting.
73 - Mike
gelmce@nc8q-mesh-server:/var/www/html/mesh $ perl olsr-topology-view-AREDN.pl --size 60,60 --style 1 --fontsize 7 --bgcolor SteelBlue --fontname Verdana
mv: cannot stat './/topology.new': No such file or directory
mv: cannot stat './/topology.new': No such file or directory
mv: cannot stat './/topology.new': No such file or directory
connection closed
gelmce@nc8q-mesh-server:/var/www/html/mesh $
Chuck,
I think the problem you see may comes from line 159:
`mv $TOPPATH/$NAME.new $TOPPATH/$NAME.$EXT`;
Maybe it is a write permission problem with your "/var/www/html/mesh"?
I just downloaded the exact file I put in the post above, removed the _.txt, put it in a totally new directory under ~/Documents then ran the script exactly as you did and it worked fine. So try the script in a directory under your home.
- Mike
This is my 'main' 'AREDN' workstation.
cd ~/Downloads
mkdir topo
gelmce@nc8q-mesh:~/Downloads$ mv olsr-topology-view-AREDN.pl_.txt topo/olsr-topology-view-AREDN.pl
gelmce@nc8q-mesh:~/Downloads$ cd topo
gelmce@nc8q-mesh:~/Downloads/topo$ perl olsr-topology-view-AREDN.pl --size 60,60 --style 1 --fontsize 7 --bgcolor SteelBlue --fontname Verdana
mv: cannot stat './/topology.new': No such file or directory
connection closed
gelmce@nc8q-mesh:~/Downloads/topo$ whoami
gelmce
gelmce@nc8q-mesh:~/Downloads/topo$ ls -ltr *
-rw-rw-r-- 1 gelmce gelmce 6937 Feb 23 07:16 olsr-topology-view-AREDN.pl
-rw-rw-r-- 1 gelmce gelmce 0 Feb 23 07:18 topology.png
-rw-rw-r-- 1 gelmce gelmce 21690 Feb 23 07:18 topology.dot
-rw-rw-r-- 1 gelmce gelmce 19131 Feb 23 07:18 input.data
gelmce@nc8q-mesh:~/Downloads/topo$
I think I found the problem. Do this install and hopefully it will work. It resolved the issue on another system that had a similar problem. And yes, this install is required anyway.
sudo apt-get install graphviz
- Mike
Hi, Mike:
Kewel! :-)
3s, Chuck
What are the steps I must do to make this map work on my RasPi on the AREDN Mesh network?
Wes Larson - KF7BWS
Hi, Wes:
Try installing perl and graphviz.
Then run the command referenced in '#10'.
My #17 is a result from my Raspberrry Pi on the local AREDN network.
Chuck
Chuck TNX
Ok Perl and graphviz is installed. I don't know what you mean by '#10' and '#17'.
NEVER MIND I see it now.
Where do I get olsr-topology-view-AREDN.pl the perl script?
It will create a nice 'topology.png' graphical map of your mesh network!
- Mike
sudo apt-get install perl
;-)
My friend made a version of olsr-topology-view-AREDN.pl that creates maps without the .local.mesh in the node names and thus the result is a bit more compact and pleasant looking. I am attaching it here.
mv olsr-topology-view-AREDN(less .local_.mesh).pl_.txt olsr-topology-view-AREDN.pl
perl olsr-topology-view-AREDN.pl --size 60,60 --style 1 --fontsize 7 --bgcolor SteelBlue --fontname Verdana
- Mike