Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

CPU Load Monitoring. More...

Functions

int cpu_load_get (int cpu_id)
 Get the CPU load as a percentage.

Detailed Description

CPU Load Monitoring.

Since
4.3
Version
0.1.0

Function Documentation

◆ cpu_load_get()

int cpu_load_get ( int cpu_id)

#include <zephyr/cpu_load/cpu_load.h>

Get the CPU load as a percentage.

Return the percent that the CPU has spent in the active (non-idle) state between calls to this function.

Parameters
cpu_idThe ID of the CPU for which to get the load.
Return values
CPUload in percent (0-100) in case of success
-errnocode in case of failure.