[OZAPRS] PERL Callsign script
Andrew VK4TEC
vk4tec at hotmail.com
Sun Sep 7 18:27:15 EST 2003
Gents,
I was just mucking around with perl. Here is what I did:-
1.connect to aprs server for 5 minutes
2. insert callsign,path,payload, email address into mysql
3. select distinct callsign from table
4. count number of packets for each callsign.
I would like to analyse path as well.
Gives some interesting results.
Most were around 1-9 or high 20's except for:-
HS0AC-1 = 307
KF6IG = 40
N0EOP-14 = 30
NHCTCM = 46
ON5QP-9 = 78
OZ8SOR = 35
SV2BZQ-14 = 70
VK3YDK-9 = 28
WR5J-9 = 63
I am not pointing any fingers, just developing some bandwidth shaping
code.
#!/usr/bin/perl
use DBI;
my $dbh = DBI->connect("DBI:mysql:aprs:host=localhost;","root","");
$sql1 = "SELECT distinct callsign from data order by callsign";
my $sth1 = $dbh->prepare($sql1);
$sth1->execute();
while (($callsign) = $sth1 -> fetchrow())
{
$sql2 = "SELECT count(*) FROM data where callsign =\"$callsign\"";
my $sth2 = $dbh->prepare($sql2);
$sth2->execute();
my $count;
while ( $count = $sth2->fetchrow )
{
print $callsign." = ". $count."\n";
}
$sth2->finish();
}
$dbh->disconnect;
--------------------------------------------------------------------------
--
---------------
Andrew Rich (VK4TEC)
SMTP vk4tec at hotmail.com
HTML www.tech-software.net
_______________________________________________
ozaprs mailing list
ozaprs at marconi.ics.mq.edu.au
http://marconi.ics.mq.edu.au/cgi-bin/mailman/listinfo/ozaprs
More information about the Ozaprs
mailing list