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

Fellow Perl mon(k|g)ers,

I'd like to write a Perl script to gather system statistics for a Win 98 box, very much like the Task Manager on W2K does. I'm looking for parameters like CPU Usage, MEM Usage, number of handles, number of processes, etc.

The script will poll the system at regular intervals to take a snap-shot of the parameters and then write the data to disk.

Then I'd use GD::Graph to display the trends for analysis.

A quick search of CPAN finds a few Win32API related modules, but nothing really jumps out at me.

Have any of you done anything like this in the past? I guess I just need a push in the right direction...

Where do you want *them* to go today?

Replies are listed 'Best First'.
Re: Win 98 System Stats
by John M. Dlugosz (Monsignor) on Jan 22, 2003 at 22:10 UTC
    There is a book on Windows System Administration with Perl. It goes over a number of modules that can be used. I don't know how much of that is applicable to Win9x, though

    What you're talking about is the Performance Monitor information. That is read using a registry key, and is different from Win9x and NT/2k/XP. You should be able to do the perfdata queries directly using the Windows Registry features easily available in Perl, or look for a module that reads "performance data".

    —John

      Thanks John -- I'll give it a gander.

      Where do you want *them* to go today?