in reply to Re: How to GET CPU values from WMI
in thread How to GET CPU values from WMI

Here is the key value:
my $key = 'Name';
As far as I know i need to instantiate the Performance Counter before I use it, like:
# pseudo algorithm my $inst = new PerformanceCounter('CPU'); while(true){ $sample = $inst->get_next_sample(); print $sample->{'total'}; print $sample->{'idle'}; print $sample->{'system'}; print $sample->{'user'}; }

But i don't know how to do it using WMI. I think I'm forced to use other method, that doesn't use WMI. Any tips?

Tks

MG

Replies are listed 'Best First'.
Re^3: How to GET CPU values from WMI
by BrowserUk (Patriarch) on Jan 20, 2011 at 18:34 UTC

    It's still not clear to me from this thread nor your previous what you are actually trying to achieve, but you might take a look at DBD::WMI.