When I run the following code:
def get_process_info(pid):
c = wmi.WMI(namespace='root\\cimv2')
obj = c.Win32_Process(ProcessId = pid)[0]
print "VirtualSize:", obj.wmi_property('VirtualSize').type
print "VirtualSize:", obj.wmi_property('VirtualSize').Value
def get_perf_info(pid):
c = wmi.WMI(namespace='root\\cimv2')
obj = c.Win32_PerfFormattedData_PerfProc_Process(IDProcess = pid)[0]
print "PrivateBytes:", obj.wmi_property('PrivateBytes').type
print "PrivateBytes:", obj.wmi_property('PrivateBytes').Value
Against a process which is using a lot of memory I get this:
VirtualSize: uint64
VirtualSize: 5015498752
PrivateBytes: uint64
PrivateBytes: 4294967295
Note that both are listed as being 64-bit values but the PrivateBytes values is 0xFFFFFFFF. If I use "WMI Explorer" I can see the PrivateBytes value is larger than 32-bits:
My question is how can I access PrivateBytes in its full 64-bit glory?
Is there a completely other way to read the WMI from python besides this WMI module?