Machine resources¶
langadapter.resources reads which processors a process may run on and how
loaded the machine is. It uses only the standard library, so it also runs in
a project interpreter.
langadapter.resources.allowed_cpus ¶
allowed_cpus()
The processors this process may run on, sorted: its affinity, the set the operating system allows it, not the processors it ran on. None where the platform reports no affinity.
langadapter.resources.hardware_usage ¶
hardware_usage() -> str
One line of system memory use and CPU load for a progress log, or '' when neither can be read.
The Python mutation engine logs it while its workers run, so the log
shows the memory use and load under the chosen worker count. It reads
/proc/meminfo and os.getloadavg, and returns '' on platforms
without them, such as Windows.