vCenter

 View Only
  • 1.  swap used in windows

    Posted Aug 20, 2007 05:22 PM
    Can somebody tell me how is calculated "swap used" in Windows or at least where to look in the source code.

    Thanks


  • 2.  RE: swap used in windows

    Posted Aug 20, 2007 05:57 PM
    The swap used metric is gathered using SIGAR.

    http://support.hyperic.com/confluence/display/SIGAR/Home

    I believe the swap metric is just a counter in the PDH. See win32_sigar.c in the SIGAR source code for the details.

    -Ryan


  • 3.  RE: swap used in windows

    Posted Aug 20, 2007 07:05 PM
    Thanks for your answer.

    Looking at win32_sigar.c, I can see:

    swap->total = memstat.ullTotalPageFile;
    swap->free = memstat.ullAvailPageFile;

    and swap used:
    swap->used = swap->total - swap->free;

    So basically in Windows, swap used is the number of TotalPageFile - AvailPageFile.