Package sysmon :: Module system :: Class Memory
[hide private]
[frames] | no frames]

Class Memory

source code

SystemPart --+
             |
            Memory
Known Subclasses:

Represents a memory (RAM) bank.

Instance Methods [hide private]
 
total_memory(self)
Returns the total amount of memory, in bytes.
source code
 
free_memory(self)
Returns the amount of completely free memory, in bytes.
source code
 
active_memory(self)
Returns the number of bytes of active memory.
source code
 
inactive_memory(self)
Returns the amount of inactive memory, in bytes.
source code
 
unused_memory(self)
Returns the amount of unused memory, in bytes.
source code
 
total_swap(self)
Returns the total amount of swap, in bytes.
source code
 
free_swap(self)
Returns the amount of free swap, in bytes.
source code
 
dict(self)
Returns a dictionary with a massive amount of meta-information, by string.
source code

Inherited from SystemPart: __init__, callback, delay, do_update, set_delay, set_system, system, update

Static Methods [hide private]

Inherited from SystemPart: null

Method Details [hide private]

free_memory(self)

source code 

Returns the amount of completely free memory, in bytes.

Generally, it's better to use unused_memory, since free_memory doesn't count caching and other such "essentially free" types of memory.

dict(self)

source code 

Returns a dictionary with a massive amount of meta-information, by string.

Most implementations will take this directly out of /proc/meminfo. It is generally bad form to use this in an application.