pysys.process.monitorimpl module

Contains implementations of the BaseProcessMonitor interface.

pysys.process.monitorimpl.DEFAULT_PROCESS_MONITOR

Specifies the default BaseProcessMonitor subclass to be used for monitoring OS-level process information on the current platform.

alias of pysys.process.monitorimpl.WindowsProcessMonitor

class pysys.process.monitorimpl.UnixProcessMonitor(owner, process, interval, handlers, **pmargs)[source]

Bases: pysys.process.monitor.BaseProcessMonitor

Unix implementation of a process monitor.

Uses the ps command line tool, reading columns pcpu, rss and vsz.

class pysys.process.monitorimpl.WindowsProcessMonitor(owner, process, interval, handlers, **pmargs)[source]

Bases: pysys.process.monitor.BaseProcessMonitor

Windows implementation of a process monitor.

Uses the GetProcessMemoryInfo, and GetProcessTimes APIs. The UserTime and KernelTime are summed together to calculate the CPU utilization for this process.

start()[source]

Called on the main test thread to start monitoring in the background.

Performs any required initialization of data structures then starts the background thread.

Returns:This instance.
Return type:BaseProcessMonitor