Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Logging and Analysing Performance Counters in Windows

by ikegami (Pope)
on Sep 07, 2004 at 21:00 UTC ( #389211=note: print w/replies, xml ) Need Help??

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)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://389211]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2017-03-26 00:35 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (313 votes). Check out past polls.