On a system monitoring project, I am retrieving process memory usage through WMI.
I am using Jacob with Java to do the WMI query:
SELECT WorkingSetSize FROM Win32_Process
This method retrieves the exact memory usage (comparing to task manager) on Windows XP; however on Windows Vista, the memory usage is about 15% higher than the memory displayed in task manager.
The system hardware for each computer is identical. Same memo开发者_如何转开发ry/processors/etc.
Are there any known issues with retrieving memory usage via Win32_Process.WorkingSetSize on Vista? Is there anything I'm missing?
Thanks in advance.
This actually ended up being an error on my part.
When comparing with the Vista task manager, the memory usage was actually using a different default metric than XP. Vista reports memory usage as Private Working Set, and XP reports memory usage as Working Set. I ended up showing the Working Set column in Vista and everything is exactly correct.
精彩评论