Hey Scripting Guys,
I wanted to know if there is a method to find virtual, resident, shared, and private memory for a single running program using Powershell. If not, what is a method to extract this information automatically through a script / executable file like device?
Thanks for the reply!
Like you've suggested I've been using the Get-Process command to find the Virtual and Private Memory usage! This part is working great, but I haven't been able to find the Shared and Resident Memory through this command. Essentially my assignment requires me to write a windows based platform of a program we already have running on Linux.
Does Windows refer to these two types of memory differently than Linux would? If not, could I still find them through Powershell?
Thanks for any help you can offer!
I followed your suggestion and opened up the task manager. I found the following types of memory
Memory- Working Set
Memory- Peak Working Set
Memory- Private Working Set
Memory- Commit Size
Memory- Paged Pool
Memory- Non-paged PoolI could not find resident or shared memory usage. These may be Linux terms, does Windows refer to these types of memory differently?
Windows does not have a concept of 'shared' memory. All processes are isolated. If data is to be shared Windows uses other mechanisms.
You have for gotten to look at: NonpagedSystemMemorySize, NonpagedSystemMemorySize64.
Those tell you what memory is physically allocated. This also can change as it I snot fixed as in Unix.
The following is the closest that Windows gets to shared memory: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366551(v=vs.85).aspx
Thanks for the quick response! That explains why I couldn't find shared memory anywhere! And for clarification, NPM is the closest I can get to resident memory right?
It is similar. It is the amount of process memory that is not swapped.
Here is further explanation: http://blogs.technet.com/b/askperf/archive/2007/03/07/memory-management-understanding-pool-resources.aspx