monitoring internet traffic
Bob Goodwin - W2BOD
bobgoodwin at wildblue.net
Thu Jun 14 12:24:34 UTC 2007
Tim wrote:
> On Wed, 2007-06-13 at 09:30 -0700, Geoffrey Leach wrote:
>
>> My Internet connection is via a satellite service that throttles the
>> connection once I exceed a number of Mb. I'd like to monitor this so
>> as to avoid unpleasant surprises.
>>
>
> It might be worth seeing if there's a specific bandwidth meter for your
> ISP. My ISP has one for Windows that shows up in its system tray,
> someone else made a Java applet that runs on everything that does the
> same thing. They're not the only ISP with tools like that. It logs
> into your account, and extracts some data periodically, and draws up a
> little graph.
>
>
I don't know if this works with Hughes but someone provided this to me
and it works perfectly with Wildblue's FAP data.
From my notes:
*********************************************************************************
#!/usr/bin/perl -w
use strict;
use XML::Simple;
use LWP::Simple;
my $url =
'http://my.wildblue.net/content/fap-sso/proxy_username.asp?user_name=bobgoodwin@wildblue.net';
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime time;
$mon++;
$year += 1900;
# Pull the XML
my $content = get $url;
die "Couldn't get $url" unless defined $content;
my $opt = XMLin($content);
printf "%2.2d/%2.2d/%2.2d %2.2d:%2.2d:%2.2d ",
$mon,$mday,$year,$hour,$min,$sec;
print "$opt->{set}->{'Actual Usage Upload'}->{value} ";
print "$opt->{set}->{'Actual Usage Download'}->{value}\n";
It required that yum install perl-XML-Simple.noarch be run. Yumex
actually ran it with dependencies.
**********************************************************************
It produces output like:
06/04/2007 06:37:35 1650 5107
06/05/2007 04:49:43 1613 8048 # F-7 d/l
06/07/2007 09:54:33 1618 7766
06/08/2007 13:42:42 1685 8100
06/09/2007 10:24:34 1700 8255
06/10/2007 04:08:23 1693 8418
06/11/2007 08:08:25 1698 9264 # F-7 Livd CD d/l
06/12/2007 04:32:21 1687 9416 # F-7 updates
06/13/2007 06:37:07 1693 10094
06/14/2007 08:03:15 1693 9855
I allowed 5 gigs down and 17 gigs up for the thirty day period ending on
the date listed. I think that is better than what Hughes allows?
My record begins 02/22/2007 so there should be messages in the archives
relative to this at about that time. I copied the file as soon as I
received the response to my query and it worked immediately so it
probably will be that day or the day before?
Bob Goodwin
More information about the fedora-list
mailing list