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

Class System

source code

Known Subclasses:

Represents an abstract system and implements some basic logic.

Instance Methods [hide private]
 
__init__(self, name='no-name') source code
 
name(self)
Returns the identifying name of the system.
source code
 
run(self)
Runs the system monitor.
source code
 
stop(self)
Stops the system monitor.
source code
 
acquire(self)
Acquire the lock object hidden in this system,
source code
 
release(self)
Release the lock object hidden in this system.
source code
 
update(self)
Performs an update of the system.
source code
 
set_delay(self, interval)
Sets the update interval after which information is refreshed, in seconds.
source code
 
delay(self)
Returns the update interval after which information is refreshed in seconds.
source code
 
set_callback(self, callback)
Sets the callback class to be used
source code
 
callback(self)
Returns the callback class being used
source code
 
parts(self)
Returns a list of all parts of the system.
source code
 
set_uptime(self, uptime)
Sets the system's uptime object.
source code
 
uptime(self)
Returns the system's uptime object.
source code
 
add_processor(self, processor)
Adds a processor to the system.
source code
 
processors(self)
Returns a list of processors in the system.
source code
 
processor(self, name)
Returns the processor with the specified name, or None if there is none.
source code
 
set_memory(self, memory)
Sets the system's memory bank.
source code
 
memory(self)
Returns the system's memory bank.
source code
 
add_drive(self, drive)
adds a drive to the system
source code
 
drives(self)
Returns a list of all physical drives in the system.
source code
 
add_filesystem(self, filesystem)
adds a filesystem to the system
source code
 
filesystems(self)
Returns a list of all filesystems in the system.
source code
 
add_networkconnection(self, nc)
Adds a network connection to the system.
source code
 
networkconnections(self)
Returns a list of all network connections in the system
source code
 
set_processlist(self, processlist)
Sets the object representing the process list.
source code
 
processlist(self)
Returns the object representing the process list.
source code
Method Details [hide private]

run(self)

source code 

Runs the system monitor.

All parts are updated immediately, and then again at the interval specified in the parts' configuration.

stop(self)

source code 

Stops the system monitor.

The monitor may safely be stopped and run and indefinite number of times.

update(self)

source code 

Performs an update of the system.

These updates are done periodically (depending on the delay setting), so there is ordinarily no reason to call it from outside of the system.

Implementation note: this method updates the entire system. Since each part may have its own delay interval, the parts are responsible for calling their own update methods independently of the system. In other words, this method is ordinarily never called.

set_delay(self, interval)

source code 

Sets the update interval after which information is refreshed, in seconds. This may be a fraction.

set_callback(self, callback)

source code 

Sets the callback class to be used

Generally, this function is not needed, as a callback class is usually created that can be used without setting a new one.