agarsha has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know how to slurp a Windows box's %CPU usage (or if windows has a load-average like counter that would be even better) into a perl script. General information about obtaining Windows box utilization metrics with perl is of interest. Unix... check VMS... check Windows... ??? --adam

Replies are listed 'Best First'.
Re: Determine Windows Box %CPU use
by BrowserUk (Patriarch) on May 24, 2003 at 22:20 UTC

    See Win32::Perflib. It ain't easy to use, but you can get all the metrics you ever wanted and more with some effort.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
Re: Determine Windows Box %CPU use
by tcf22 (Priest) on May 25, 2003 at 06:35 UTC