Eric Logeson wrote:

> Hello List
>  
> I wanted to get some basic bandwidth statistics across a WAN link.  The
> approach I think I am going to take is the following:
> Use a perl scipt to read in a bunch of files, determine the sizes, start
> a timer (not sure how to do this yet), copy the files across the link
> (winxp->win2003 server), stop the timer,

What do you mean by copy ?  Are you tunneling a Windoze LAN across the
Internet (sharing devices acroos a WAN) or using FTP or ??

> and finally write out the bytes/sec metric to a log file.  I planned on
> scheduling the perl script to run every hour or so for a week.

For a bit better timer resolution:

my $t0 = Win32::GetTickCount ();
        <time stuff here>
my $elapsed = Win32::GetTickCount ();
printf "%.3f seconds\n", ($elapsed - $t0) / 1000;

or more portable:

use Time::HiRes qw(gettimeofday tv_interval);

my $t0 = [&gettimeofday ()];
        <time stuff here>
my $elapsed = tv_interval ($t0);
printf "%.3f seconds\n", $elapsed;

> Are there modules of interest for this project.  Any suggestions on the
> approach?

For the file copy to a shared device or remotely mounted filesystem,
I would look at Win32API::File or Win32::FileOp to do the copy.

Other than that (which should give you better copy times from shared
network devices), you shouldn't need more than the basic modules.

-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to