I'm basically trying to query private working set of a process in perl.
I have already refereed this post.
The solution works great on win8/8.1 but for some reason the following line returns nothing on win7x64 and I have tried using IDProcess instead of Name, it still returns no process.
my $proc = $objWMI->ExecQuery("select * from Win32_Process where Name=\'notepad\'");
$objWMI = Win32::OLE->GetObject('winmgmts:\\\\.\\root\\cimv2');
$proc= $objWMI->ExecQuery("select * from Win32_PerfRawData_PerfProc_Process where Name=\'notepad\'");
foreach my $process (in($proc))
{
print "abc";
$out = $process->{WorkingSetPrivate};
}
So this thing doesn't work. Is there any different way of querying private working set size of a process in perl?