all groups > c# > april 2008 >
You're in the

c#

group:

how to get memory usage


how to get memory usage auldh
4/24/2008 10:00:01 AM
c#: i have need to build a program in C# that will collect specific data for a
service on remote machines.

i see how i can use "win32_process" to get threadcount and handlecount of a
service. but i don't see how to get the memory usage as seen in the task
manager.

i have a service that runs on multiple servers. i need to get a snap shot of
the services: threadcount, handlecount and memory usages.

i like it so that the program runs on one machine and then polls those
machines i specify and write the data to the file.

Re: how to get memory usage auldh
4/24/2008 12:12:00 PM
Willy,
if you look at the task manager you see the memory usage column.
but in the "win32_process" i don't see how to find the actual memory ussage
of the process.


[quoted text, click to view]
Re: how to get memory usage Willy Denoyette [MVP]
4/24/2008 7:51:10 PM
[quoted text, click to view]



Don't know exactly what "memory" you are looking for but Win32_Process has
all memory related properties you need.


Willy.
Re: how to get memory usage Willy Denoyette [MVP]
4/24/2008 9:45:16 PM
[quoted text, click to view]


Taskman's Memory Usage = WorkingsetSize.

Willy.



AddThis Social Bookmark Button