HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: USR Modems



Hi Everyone,
I've hacked out a little script(attached below) to provide a error report
by modem - it should be able to run on any modem not just Sportsters.
To run cut and paste the script below, call it errorstats and
		./errorstats /var/spool/fax/etc/xferlog
or wherever the location of your xferlog file is

If you could report this info directly to me
   (1) The modems serial no - its a long no written on the side of the modem
   (2) The output of ati7
   (3) If you could run the script below 
   (4) anything else you think relevant

The script is just to give me an idea of how many faxes you've sent and how
many errors were encountered, particularly Transmit Phrase B

PS Does anyone know what ati0 on  the USR modems does, its looks like some
cryptic 4 digit code - the manual says product code but i can't find any
info relating it back to particular model nos.

Thanks - Robert

-------------------------------- Cut Here----------------------------------
#
# errorstats - Script to parse error data out of xferlog
#
echo count $#
if [ $# > 0 ]; then
	XFERLOG=$1
else
	XFERLOG=/var/spool/fax/etc/xferlog
fi
awk -F "\t" '
	function doline(a, b, c) { printf "%-60.60s %5i %8.1f\n", a, b, c }
	{
		if ( $4 != "" ) total[$4] += 1
		if ( $11 == "0") {
			errname[$14] = 0
			errcount[$4,$14] += 1
		}
	}
	END {
		for (m in total) {
			printf "Modem: %s\n",m
			printf "%-68.68s %6i\n\n","Total faxes sent:",total[m]
			printf "%-60.60s %5s %10s\n","Error", "No","Rate/1000"
			printf "---------------------------------------"
			printf "---------------------------------------\n"
			tot = 0
			for (n in errname) {
				if ( errcount[m, n] > 0 ) {
					name = n
					gsub("\"","",name)
					rate = errcount[m, n] * 1000 / total[m]
					tot += errcount[m, n]
					doline(name, errcount[m, n], rate)
				}
			}
			printf "---------------------------------------"
			printf "---------------------------------------\n"
			doline("Total", tot, tot * 1000 / total[m])
			printf "\n"
		}
	}' < $XFERLOG 




Project hosted by iFAX Solutions