syspy  0.1
syspy windows system information tool with python
syspy.memory.memory.Memory Class Reference

Public Member Functions

def __init__ (self)
 
def bytes2human (self, n)
 
def getVirtualMemory (self)
 
def getSwapMemory (self)
 
def getMemoryInfo (self)
 
def getMemoryInfoEx (self)
 
def getMemoryPercent (self)
 
def getMemoryMap (self, poid)
 

Detailed Description

Definition at line 9 of file memory.py.

Constructor & Destructor Documentation

def syspy.memory.memory.Memory.__init__ (   self)

Definition at line 11 of file memory.py.

Here is the call graph for this function:

Member Function Documentation

def syspy.memory.memory.Memory.bytes2human (   self,
  n 
)

Definition at line 20 of file memory.py.

Here is the caller graph for this function:

def syspy.memory.memory.Memory.getMemoryInfo (   self)
START Test Results
    >>> import psutil
    >>> p = psutil.Process()
    >>> p.memory_info()
    pmem(rss=8536064, vms=5599232)
    >>> minfo = list(p.memory_info())
    >>> minfo
    [8613888, 5672960]
    >>>
END Test Results

START return values

    ret_rss = RSS(Resident Set Size)
    ret_vms = VMS(Virtual Memory Size)

END return values

Definition at line 92 of file memory.py.

Here is the call graph for this function:

Here is the caller graph for this function:

def syspy.memory.memory.Memory.getMemoryInfoEx (   self)
START Test Results
    >>> import psutil
    >>> p = psutil.Process()
    >>> p.memory_info_ex()
    pextmem(num_page_faults=2277, peak_wset=8552448, wset=8552448, peak_paged_pool=1
    00980, paged_pool=100980, peak_nonpaged_pool=4484, nonpaged_pool=4484, pagefile=
    5607424, peak_pagefile=5607424, private=5607424)
    >>> minfo = list(p.memory_info_ex())
    >>> minfo
    [2297, 8634368, 8634368, 100980, 100980, 4844, 4844, 5681152, 5681152, 5681152]
    >>>
END Test Results

START return values
    
    a = num_page_faults
    b = peak_wset
    c = wset
    d = peak_paged_pool
    e = paged_tool
    f = peak_nonpaged_pool
    g = nonpaged_pool
    h = pagefile
    i = peak_pagefile
    j = private

    http://pythonhosted.org/psutil/#psutil.Process.memory_info_ex

END return values

Definition at line 121 of file memory.py.

Here is the call graph for this function:

Here is the caller graph for this function:

def syspy.memory.memory.Memory.getMemoryMap (   self,
  poid 
)
START Test Results
    PID: 5128
    Name: conhost.exe
    RSS: 4.0K
    Permission: r
    Path: C:\Windows\System32\apisetschema.dll
    Total RSS: 24.5M
END Test Results

START return values

PID: Process ID
NAME: Process Name
RSS: Resident Set Size
Permission: Process Permission
Path: Process Api Path
Total RSS: Total Resident Set Size

END return values

Definition at line 195 of file memory.py.

Here is the call graph for this function:

Here is the caller graph for this function:

def syspy.memory.memory.Memory.getMemoryPercent (   self)
START Test Results

    >>> import psutil
    >>> p = psutil.Process()
    >>> p.memory_percent()
    0.3954443586076075
    >>> list(p.memory_percent())
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: 'float' object is not iterable
    >>>

END Test Results

Definition at line 171 of file memory.py.

Here is the caller graph for this function:

def syspy.memory.memory.Memory.getSwapMemory (   self)
START Test Results

    >>> import psutil
    >>> psutil.swap_memory()
    sswap(total=4284055552, used=1793249280, free=2490806272, percent=41.9, sin=0, s
    out=0)
    >>> smem = psutil.swap_memory()
    >>> lsmem = list(smem)
    >>> lsmem
    [4284055552, 1794441216, 2489614336, 41.9, 0, 0]
    >>>

END Test Results

Definition at line 64 of file memory.py.

Here is the call graph for this function:

Here is the caller graph for this function:

def syspy.memory.memory.Memory.getVirtualMemory (   self)
START Test Results

    >>> import psutil
    >>> mem = psutil.virtual_memory()
    >>> mem
    svmem(total=2142027776, available=1013366784, percent=52.7, used=1128660992, free=1013366784)
    >>> lmem = list(mem)
    >>> lmem
    [2142027776, 1013366784, 52.7, 1128660992, 1013366784]
    >>> lmem[0]
    2142027776
    >>>

END Test Results

Definition at line 36 of file memory.py.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: