SystemStatus QML Type
Provides information on the status of the system as a whole. More...
| Import Statement: | import QtApplicationManager |
Properties
- cpuCores : int
- cpuLoad : real
- cpuPSI : PressureStallInformation
- ioPSI : PressureStallInformation
- memoryMax : int
- memoryPSI : PressureStallInformation
- memoryUsed : int
- roleNames : list<string>
Methods
- void update()
Detailed Description
SystemStatus monitors the running system, providing CPU and memory statistics as well as pressure stall information (PSI). It is the system-wide counterpart to CGroupStatus, which monitors a single Linux control group.
Note: CPU and memory monitoring work on Linux, Windows, and macOS. The PSI properties are only functional on Linux (kernel 4.20 or later with CONFIG_PSI enabled). All PSI properties return 0 or are non-functional on other platforms.
Memory and CPU monitoring
The memoryMax property reports the total amount of physical RAM installed on the system and is constant. The current memory usage and CPU load are available via memoryUsed and cpuLoad, which are updated on every call to update(). Unlike CGroupStatus, there is no system-level equivalent of memory.high, so a memoryHigh property is not exposed.
You can use this type as a MonitorModel data source to record system load over time:
import QtQuick
import QtApplicationManager
MonitorModel {
SystemStatus {}
}Alternatively, drive updates yourself with a Timer:
import QtQuick
import QtApplicationManager
SystemStatus { id: systemStatus }
Timer {
interval: 1000
running: true
repeat: true
onTriggered: systemStatus.update()
}Pressure stall monitoring
The cpuPSI, memoryPSI, and ioPSI properties each expose a PressureStallInformation object for event-driven pressure monitoring, backed by the kernel's system-wide interfaces at /proc/pressure/cpu, /proc/pressure/memory, and /proc/pressure/io. Configure the desired mode, timeWindow, and stallTime, then connect to the triggered signal to react when the threshold is exceeded:
import QtQuick
import QtApplicationManager
SystemStatus {
id: systemStatus
Component.onCompleted: {
cpuPSI.timeWindow = 2000 // 2 second observation window
cpuPSI.stallTime = 200 // fire if stalled for 200ms within that window
cpuPSI.mode = PressureStallInformation.Some
}
}
Connections {
target: systemStatus.cpuPSI
function onTriggered() { console.log("System-wide CPU pressure detected") }
}See also CGroupStatus, CpuStatus, MemoryStatus, MonitorModel, and PressureStallInformation.
Property Documentation
cpuCores : int [read-only]
The number of physical CPU cores installed on the system.
cpuLoad : real [read-only]
The overall system CPU utilization between the two most recent calls to update(), as a value ranging from 0 (inclusive, completely idle) to 1 (inclusive, all CPU cores fully busy).
See also update() and cpuCores.
cpuPSI : PressureStallInformation [read-only]
Provides access to system-wide CPU pressure stall monitoring, backed by /proc/pressure/cpu. Monitors situations where tasks anywhere on the system are delayed waiting for CPU time.
Only functional on Linux when the kernel has PSI support enabled.
See also PressureStallInformation, memoryPSI, and ioPSI.
ioPSI : PressureStallInformation [read-only]
Provides access to system-wide I/O pressure stall monitoring, backed by /proc/pressure/io. Monitors situations where tasks anywhere on the system are delayed waiting for I/O.
Only functional on Linux when the kernel has PSI support enabled.
See also PressureStallInformation, cpuPSI, and memoryPSI.
memoryMax : int [read-only]
The total amount of physical memory (RAM) installed on the system, in bytes. This is the system-wide analog of CGroupStatus::memoryMax.
memoryPSI : PressureStallInformation [read-only]
Provides access to system-wide memory pressure stall monitoring, backed by /proc/pressure/memory. Monitors situations where tasks anywhere on the system are delayed waiting for memory.
Only functional on Linux when the kernel has PSI support enabled.
See also PressureStallInformation, cpuPSI, and ioPSI.
memoryUsed : int [read-only]
The amount of physical memory currently in use system-wide, in bytes. Refreshed on every call to update().
See also update() and memoryMax.
roleNames : list<string> [read-only]
Names of the roles provided by SystemStatus when used as a MonitorModel data source.
See also MonitorModel.
Method Documentation
void update()
Updates the memoryUsed and cpuLoad properties.
See also memoryUsed and cpuLoad.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.