Mike Driscoll
Mon, 01 Mar 2010 06:41:48 -0800
Hi Mark, On 2/26/2010 5:14 PM, Mark Hammond wrote:
On 27/02/2010 2:22 AM, Mike Driscoll wrote:Hi, I have been tasked with trying to find a way to query the peak commit charge of our various workstations. It would be great if I could do it remotely, but logging is also a possibility. Unfortunately, my Google skills have failed me as I can't find anyone else who is doing this publicly. Do you guys have any hints for how best to approach this task? Here's the use case: We are using Sun Ray virtual desktops and are trying to figure out how much RAM each VM is using. We are trying to decide if we can shrink the allocated amount of RAM of if we should just upgrade the servers.Maybe look into the win32pdh/win32pdhutil modules? Mark
I must be dense, but I'm not seeing how to tell win32pdh which counter I want it to count. I did some research on Google and Windows forums and they seemed to either have nothing on the subject or they would mention the Win32_PerfFormattedData_PerfOS_Memory class. I tried querying that with Tim Golden's WMI, but this class only seems to expose the Total commit charge and the limit commit, but not the peak (see http://msdn.microsoft.com/en-us/library/aa394268%28VS.85%29.aspx).
The only other hint I found was this: http://forum.sysinternals.com/forum_posts.asp?TID=15540&PID=75852 where someone says the following: "The only way I'm aware of that one can get this detail is from the uMmPeakCommitLimit member of the SYSTEM_PERFORMANCE_INFORMATION structure one passes to NtQuerySystemInformation when calling it with the SystemPerformanceInformation type."
Unfortunately, I don't have a clue as to how to do that in Python. From what I've seen on the list about NtQuerySystemInformation, it doesn't sound like PyWin32 wraps it. Is that correct? Thanks!
- Mike _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32