paradrop.core.system package

Submodules

paradrop.core.system.system_info module

Get system information

getDMI()[source]

Read hardware information from DMI.

This function attempts to read from known files in /sys/class/dmi/id/. If any are missing or an error occurs, those fields will be omitted from the result.

Returns: a dictionary with fields such as bios_version and product_serial.

getOSVersion()[source]

Return a string identifying the host OS.

getPackageVersion(name)[source]

Get a python package version.

Returns: a string or None

paradrop.core.system.system_status module

Get system running status including CPU load, memory usage, network traffic.

class SystemStatus[source]

Bases: object

INCLUDED_PARTITIONS = set(['/writable', '/'])
classmethod getNetworkInfo()[source]
classmethod getProcessInfo(pid)[source]
getStatus(max_age=0.8)[source]

Get current system status.

max_age: maximum tolerable age of cached status information. Set to None to force a refresh regardless of cache age.

Returns a dictionary with fields ‘cpu_load’, ‘mem’, ‘disk’, and ‘network’.

classmethod getSystemInfo()[source]
refreshCpuLoad()[source]
refreshDiskInfo()[source]
refreshMemoryInfo()[source]
refreshNetworkTraffic()[source]

Module contents