Greetings I am trying to find CPU and memory usage on a windows machine and i was able to get through memory usage using Win32::Process::Info module's GetProcInfo function. This code may be helpfull to others which calculate the memory usage of a particular process on windows
#!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" } } } However i am struck at the cpu usage part.. If anyone can point me to some good article or any docs to read for the same would be appreciated. I have already googled a lot but i think i am missing something.. Thanks .. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/