Re: CPU/Memory usage of a process on Windows machine
- From: oryann9@xxxxxxxxx (Oryann9)
- Date: Fri, 29 Jun 2007 08:29:31 -0700 (PDT)
#!c:/perl/bin/perl.exe
# This is a test scrip
use Win32::Process::Info;
use warnings;
use strict;
my $pi = Win32::Process::Info->new ();
my @process_information = $pi->GetProcInfo(4488);
## 4488 is pid of a
particular process.
foreach $info (@process_information) {
foreach my $key (keys %{$info}) {
if ($key eq "WorkingSetSize") {
my $value = ${$info}{$key}/1024;
print "$key:=>$value \n"
}
}
}
I tried to use a regexp like so
and it prints nothing, however I use the PID of the
outlook process and it works???
Any help would be appreciated!
my $name qr(/out\w+/i);
my @process_information = $pi->GetProcInfo($name);
____________________________________________________________________________________
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097
.
- References:
- CPU/Memory usage of a process on Windows machine
- From: Jeevs
- CPU/Memory usage of a process on Windows machine
- Prev by Date: Test::Class fixture problem
- Next by Date: how to get references from imbricated capturing parenthesis ?
- Previous by thread: CPU/Memory usage of a process on Windows machine
- Next by thread: Re: CPU/Memory usage of a process on Windows machine
- Index(es):
Relevant Pages
|