Psutil
Description
Psutil is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors) from Python. It provides APIs that mirror common operating-system tools (such as ps, top, netstat, and lsof) and enables process management operations like termination, resource limits, and I/O counters.
General details
- Developer(s): Giampaolo Rodola, with contributions from the psutil community.
- Open source: Yes
- Language(s): Python (with C extensions)
- Repository: https://github.com/giampaolo/psutil
- License: BSD-3-Clause
- Operating system(s): Linux, Windows, macOS, FreeBSD, OpenBSD, NetBSD, SunOS/Solaris, AIX.
- Actively maintained: Yes (latest release 7.1.3 on 02 Nov 2025)
Intended use on the device
The SOUP is used in the medical device for the following specific purposes only:
- Collect runtime system metrics (CPU, memory, disk, network, and sensor data) to support health monitoring and operational telemetry of services.
- Inspect and manage process-level information (PIDs, resource consumption, status) to aid diagnostics and controlled shutdowns within services.
Requirements
For the integration and safe usage of this SOUP within a software system, it's important to outline both functional and performance requirements. These requirements help mitigate risks and ensure compatibility and performance standards are met.
Functional
- System metrics: Provide APIs to read CPU utilization and times, memory usage, disk partitions/IO, network IO, and hardware sensor data where available.
- Process inspection: Allow querying process metadata (PID, name, cmdline, status), resource usage, open files, sockets, and threads for monitoring and diagnostics.
- Process control: Enable safe interactions such as sending signals, terminating processes, adjusting niceness/priority, and waiting for process completion where supported.
- Cross-platform compatibility: Maintain consistent interfaces across supported operating systems with graceful degradation when OS-level data is unavailable.
- Serialization helpers: Offer dictionary-friendly outputs (
as_dictand info mappings) to simplify logging and reporting of collected metrics.
Performance
- Low overhead sampling: Gather metrics with minimal CPU and memory overhead to avoid distorting monitored system performance.
- Scalability: Handle frequent sampling intervals and multiple concurrent process inspections without significant latency growth.
- Resource safety: Manage native handles (files, sockets) responsibly to avoid leaks during repeated metric collection.
- Thread/process safety: Operate correctly when invoked from multi-threaded services or multi-process deployments typical of web workloads.
System requirements
Establishing minimum software and hardware requirements is important to mitigate risks, such as security vulnerabilities, performance issues, or compatibility problems, and to ensure that the SOUP functions effectively within the intended environment.
Software
After evaluation, we find that there are no specific software requirements for this SOUP. It works properly on standard computing devices, which includes our environment.
Hardware
After evaluation, we find that there are no specific hardware requirements for this SOUP. It works properly on standard computing devices, which includes our environment.
Documentation
The official SOUP documentation can be found at https://psutil.readthedocs.io/en/latest/.
Additionally, a criterion for validating the SOUP is that all the items of the following checklist are satisfied:
- The vendor maintains clear and comprehensive documentation of the SOUP describing its functional capabilities, user guidelines, and tutorials, which facilitates learning and rapid adoption.
- The documentation for the SOUP is regularly updated and clearly outlines every feature utilized by the medical device, doing so for all integrated versions of the SOUP.
Related software items
We catalog the interconnections between the microservices within our software architecture and the specific versions of the SOUP they utilise. This mapping ensures clarity and traceability, facilitating both the understanding of the system's dependencies and the management of SOUP components.
Although the title of the section mentions software items, the relationship with SOUP versions has been established with microservices (also considered software items, by the way) because each one is inside a different Docker container and, therefore, has its own isolated runtime environment.
| SOUP version | Software item(s) |
|---|---|
| >=7.1.0 | projects/libs/expert_core |
Related risks
The following are risks applicable to this SOUP from the table found in document R-TF-013-002 Risk management record_2023_001:
- 58. SOUP presents an anomaly that makes it incompatible with other SOUPs or with software elements of the device.
- 59. SOUP is not being maintained nor regularly patched.
- 60. SOUP presents cybersecurity vulnerabilities.
Lists of published anomalies
The incidents, anomalies, known issues or changes between versions for this SOUP can be found at:
History of evaluation of SOUP anomalies
09 Dec 2025
- Reviewer of the anomalies: Gerardo Fernández Moreno
- Version(s) of the SOUP reviewed: 7.1.3
No anomalies have been found.
Record signature meaning
- Author: JD-004
- Reviewer: JD-003
- Approver: JD-005