Linux-Hams archive - June 1997: "monax25" hint and tweaks

"monax25" hint and tweaks

John Ackermann AG9V (terhi.victor@logonet.com)
Mon, 02 Jun 1997 14:08:02 -0400


I've recently started playing with the monax25 package (available from
Jonathans' site) under Linux. It's a package of programs that capture,
and process, the data from a packet channel and allow you to measure
utilization, number of retries, channel efficiency, and other really
interesting stuff. In particular, you can look at "circuits" (pairs of
stations) and see how well they are communicating.

The "stats" program that's part of the package generates a neat log of
activity on the channel, but it's designed for interactive use -- although
you can enter the necessary parameters at the command line, it shows a
running trace of channel activity, and can accept keyboard input for
configuration.

I wanted to run it in the background, redirected to /dev/null, but that's
not as simple as it looks. You need to redirect stdin as well as stdout
and errout, or the program will terminate as soon as there's any keyboard
activity on the console from which you started it.

But, if you redirect the input from /dev/null, the program does some sort of
busy wait that sucks up 100 percent of the CPU.

I ended up doing this:

./stats < /dev/tty7 > /dev/tty7 2>&1 &

to redirect it to an unused virtual terminal. That seems to work fine.

Also, as distributed the program would segfault after running for a few
minutes monitoring our 19.2kb repeater off a PI card. My guess is that
the counters were overflowing trying to keep up with the traffic on the
high(er) speed channel -- this program was written in 1987 for 1200 baud
monitoring.

It's hardwired to dump its output a the logfile every five minutes; I changed
that to two minutes and the problem seems to have gone away.

I also made a couple of tweaks to support 38.4 serial lines, and increase the
maximum packet size from 256 up to 1600. I also moved the location of the
logfile from ./LOG to /var/ax25/monax25/LOG to (sort of) comply with FSSTD.

I've posted my slightly patched version to

ftp://ftp.febo.com/pub/linux_ham/monax251.1a.tar.gz.

Feel free to grab it if you'd like. I do think that this tool could be
made *really* slick if someone with some programming knowledge -- and
understanding of our protocols -- would put a bit of effort into updating
and enhancing it. Unfortunately, I don't have the skill set to do more
than potch with it.

John AG9V
paiyudv@bilow.com