none
Finding virtual, resident, shared, and private memory for a single program on Windows

    Question

  • 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,

    AWSG1991

    • Moved by Bill_Stewart Sunday, December 29, 2013 2:02 PM Abandoned
    Thursday, July 25, 2013 1:03 PM

All replies

  • Yes - it is listed in task manager.  You may have to add the extra columns depending on the version of windows.

    ¯\_(ツ)_/¯

    Thursday, July 25, 2013 2:31 PM
  • Get-Process doesn't return enough information for you?

    Don't retire TechNet!

    Thursday, July 25, 2013 3:37 PM
  • Try Get-Process cmdlet

    Regards Sivakarthi

    Thursday, July 25, 2013 4:00 PM
  • 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!

    Monday, July 29, 2013 12:03 PM
  • Hello jrv,

    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?

    Thanks!

    Monday, July 29, 2013 12:14 PM
  • 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


    ¯\_(ツ)_/¯

    Monday, July 29, 2013 2:24 PM
  • 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?
    Monday, July 29, 2013 2:40 PM
  • 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


    ¯\_(ツ)_/¯

    Monday, July 29, 2013 3:35 PM