Re: CPU/Memory usage of a process on Windows machine
- From: oryann9@xxxxxxxxx (Oryann9)
- Date: Fri, 29 Jun 2007 11:11:56 -0700 (PDT)
You have to add UserModeTime and KernelModeTime then
divide by 10,000,000.
See:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept05/hey0922.mspx
use Win32::Process::Info;
use Data::Dumper;
my $pi = Win32::Process::Info->new ();
my @process_information = $pi->GetProcInfo(3692);
foreach my $info (@process_information) {
foreach my $key (keys %{$info}) {
if ($key eq "Name" or $key eq
"WorkingSetSize" or
$key eq "UserModeTime" or $key eq
"KernelModeTime") {
my $value = ${$info}{$key};
print "\n$key: => $value \n";
}
}
}
~
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
.
- References:
- CPU/Memory usage of a process on Windows machine
- From: Jeevs
- CPU/Memory usage of a process on Windows machine
- Prev by Date: Re: How can i make a perl program lauch another perl program that takes options
- Next by Date: Re: Adding a line in a file inside many directories
- Previous by thread: Re: CPU/Memory usage of a process on Windows machine
- Next by thread: delete from java temporary file generated from PERL
- Index(es):