in reply to Bandwidth measurement with Perl?
Windows has performance counters that can be used to track this, and even graph it. Head to Administrative Tools in the Control Panel and select Performance. you can see it charted in real time in System Monitor (right-click, Add Counter, ...) or log it using Counter Logs (right-click, New Log Settings, ...). I think there's a way to graph logs, but I didn't look for it since you wanted to use perl.
When logging, you have the option of starting a new file and/or having a program automatically launched every X time units. You could use this to lauch a perl script to analyse the logs regularly. (Maybe it passes the log name as an arg?? Maybe only if you specify %1??).
There a few file formats available (binary, CSV, TSV, binary circlular). Binary appears to be a list of packed timestamped samples preceeded with a header. You might be able to find some info on it if you search, or it should be pretty easy to deduce enough to use it. Or you could simply use CSV, which looks as follow:
"(PDH-CSV 4.0) (Eastern Daylight Time)(240)","\Network Interface(D-Lin +k DFE-530TX PCI Fast Ethernet Adapter)\Bytes Total/sec" "09/07/2004 16:55:52.920","197.72459904908843" "09/07/2004 16:56:07.922","8463.4043604248636" "09/07/2004 16:56:22.924","3580.6992148876643" "09/07/2004 16:56:37.926","3465.1013327365235" "09/07/2004 16:56:52.928","3496.5035571311519" "09/07/2004 16:57:07.930","3578.1525481840044"
(This should give a hint as to the fields in the bin format, btw)