Package gmisclib :: Module system_load
[frames] | no frames]

Module system_load

source code

Classes
  pstat
Functions
 
load_avg() source code
float
mem_pressure(verbose=False)
Returns: Big (>1) when the system is really hurting for memory.
source code
 
ncpu() source code
 
get_ncpu() source code
 
get_loadavg() source code
 
load_now(my_weight=1, other_weight=2, d_weight=0.5, ignore=None, verbose=False) source code
float in the range [-0.5, 0.5]
niceness()
Returns: positive numbers if the process is niced; negative numbers if not.
source code
Variables
  PROC = '/proc'
  __package__ = 'gmisclib'

Imports: os, re, die


Function Details

mem_pressure(verbose=False)

source code 
Returns: float
Big (>1) when the system is really hurting for memory. Small (<0.5) when things are going well. Also, by way of the amount of dirty memory, it indirectly looks at the rate of writing to the disk.

niceness()

source code 
Returns: float in the range [-0.5, 0.5]
positive numbers if the process is niced; negative numbers if not.