title: Calculating Private Working set memory from WMI class methods
body: <p>I am using the following perl program which uses WMI class Win32_Process to determine memory usage of a process</p>
  
  <pre><code>use strict;
  use warnings;
  use Win32::OLE qw/in/;
  sub memory_usage()
  {
      my $objWMI = Win32::OLE-&gt;GetObject('winmgmts:\\\\.\\root\\cimv2');
      my $processes = $objWMI-&gt;ExecQuery("select * from Win32_Process where Name=\'notepad.exe\'");
      my $memory = 0;
  
      foreach my $proc (in($processes))
      {
           $memory = $memory + $proc-&gt;{WorkingSetSize};
      }
      return $memory;
  }
  print 'Memory usage: ', memory_usage(), "\n";
  </code></pre>
  
  <p>WMI class Win32_Process and its properties are given on MSDN <a href="http://msdn.microsoft.com/en-us/library/aa394372%28v=VS.85%29.aspx" rel="nofollow">here</a></p>
  
  <p>Problem is that it calculates Working Set Memory and i want to calculate Private Working set memory, for which no property is defined on the linked page</p>
  
  <p>Is there some way i can calculate Private Working set memory from this class?</p>