I only want to see this data for a selected few process names; can we say grep? Tried an HoA, but the output was all garbbled together. Any ideas? thank you__DATA__ Name => ---- SymSPort.exe WorkingSetSize => -------------- 348160 KernelModeTime => -------------- 0.0625 UserModeTime => ------------ 0.046875 Name => ---- uphclean.exe WorkingSetSize => -------------- 155648 KernelModeTime => -------------- 0.03125 UserModeTime => ------------ 0.03125 ... ... ... and another proccess name and another process name....
use strict; use warnings; use Win32::Process::Info; use Data::Dumper; my $pio_2 = Win32::Process::Info->new (); my @pids = $pio_2->ListPids (); my @proc_info; for my $pid (@pids) { @proc_info = $pio_2->GetProcInfo($pid); for my $info (@proc_info) { for 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 qq(\n$key => \n), q(-) x length $key, qq(\n$value \n); } ## END IF } } }
In reply to Win32... CPU/RAM usage by mikejones
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |