[App_rpt-users] Show link topology from cli?

Doug Crompton doug at crompton.com
Mon Nov 17 18:26:58 UTC 2014


That is certainly a way to do it. Here is another option that doesn't mess with the CLI. The 'archivedir' command in rpt.conf creates dated text files of all node activity. Unfortunately it also saves wav files of all of the audio. This is not a problem on a large disk based system but on the BBB it would just not work. So new in the BBB code is a command called 'archiveaudio' which was created to turn off the saving of the audio portion of the archive thus greatly reducing the storage load. I am not sure if this command has made its way to Acid. If you do use this on the BBB make sure you archive to a tmpfs like /tmp and also delete past files periodically because even they get large depending on you nodes activity. 'archivedir' saves based on date, creating one file per calendar day. 

Example of using command in rpt.conf:

[27225]
rxchannel = SimpleUSB/usb
duplex=1
erxgain=-3
etxgain=3
archivedir=/var/log/asterisk/audio
archiveaudio=0          ; Disable saving .wav files

This creates a directory under the archivedir path of the node number.  Multiple archives can be stored if you put these commands in each node stanza. This listing shows files dating back to July 31 of all node activity. This is an Acid system modified to not save audio files.

[root at WA3DSP_Allstar asterisk]# cd /var/log/asterisk/audio/27225/
[root at WA3DSP_Allstar 27225]# ls
20140731.txt  20140815.txt  20140830.txt  20140914.txt  20140929.txt  20141014.txt  20141029.txt  20141113.txt
20140801.txt  20140816.txt  20140831.txt  20140915.txt  20140930.txt  20141015.txt  20141030.txt  20141114.txt
20140802.txt  20140817.txt  20140901.txt  20140916.txt  20141001.txt  20141016.txt  20141031.txt  20141115.txt
20140803.txt  20140818.txt  20140902.txt  20140917.txt  20141002.txt  20141017.txt  20141101.txt  20141116.txt
20140804.txt  20140819.txt  20140903.txt  20140918.txt  20141003.txt  20141018.txt  20141102.txt  20141117.txt
20140805.txt  20140820.txt  20140904.txt  20140919.txt  20141004.txt  20141019.txt  20141103.txt  rxlog.txt
20140806.txt  20140821.txt  20140905.txt  20140920.txt  20141005.txt  20141020.txt  20141104.txt  tail.pl
20140807.txt  20140822.txt  20140906.txt  20140921.txt  20141006.txt  20141021.txt  20141105.txt  
20140808.txt  20140823.txt  20140907.txt  20140922.txt  20141007.txt  20141022.txt  20141106.txt
20140809.txt  20140824.txt  20140908.txt  20140923.txt  20141008.txt  20141023.txt  20141107.txt
20140810.txt  20140825.txt  20140909.txt  20140924.txt  20141009.txt  20141024.txt  20141108.txt
20140811.txt  20140826.txt  20140910.txt  20140925.txt  20141010.txt  20141025.txt  20141109.txt
20140812.txt  20140827.txt  20140911.txt  20140926.txt  20141011.txt  20141026.txt  20141110.txt
20140813.txt  20140828.txt  20140912.txt  20140927.txt  20141012.txt  20141027.txt  20141111.txt
20140814.txt  20140829.txt  20140913.txt  20140928.txt  20141013.txt  20141028.txt  20141112.txt

tail.pl, a Perl script which is attached, deals with the extraction of the data. In this case the RXKEY's only indicating who key the circuit. I also pull in the database file to nicely display the node QTH and location.

Here is what the processed rxlog looks like:

09/09/2014 08:41:26 RXKEY 40865   WD9EQD  147.435 Simplex       Smithville, NJ
09/09/2014 08:41:39 RXKEY 40561   WA3DSP  ECHOLINK - 147090     Richboro, PA - Hub
09/09/2014 08:41:45 RXKEY 40865   WD9EQD  147.435 Simplex       Smithville, NJ
09/09/2014 08:41:49 RXKEY 40561   WA3DSP  ECHOLINK - 147090     Richboro, PA - Hub
09/09/2014 08:41:59 RXKEY 29817   NY3J    446.150 Simplex 91.5  Bensalem, PA

The rxlog is read by a simple script which keeps tabs on what the system is doing. The Perl script, tail.pl, is run in the background constantly monitoring the current archive file and saving parsed data to rxlog.txt :

[root at WA3DSP_Allstar 27225]# cat /usr/local/sbin/rxlog.sh
#! /bin/bash

tail -f /var/log/asterisk/audio/27225/rxlog.txt

Of course this could be expanded to view other parameters as all of the control data is in the individual text files. In my case the only thing that was important to me was who keyed or who is keyed in a situation where someone is hanging a circuit. It would be easy to show keyed status in a display using RXKEY and RXUNKEY 

Where you put the files and how you deal with the data is your option. These are only examples.

73 Doug
WA3DSP
http://www.crompton.com/hamradio


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20141117/fb555d99/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tail.pl
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20141117/fb555d99/attachment.pl>


More information about the App_rpt-users mailing list