Dear all,
I have a question about the CPU. Within my addition to the code I do some matrix calculations and even a 7x7 inversion. As the code does not seem to function properly I need to check if the CPU can handle all the mathematics. Is there a way to check if the CPU is not overloaded?
I have the debug adapter.
Greetings
Max
CPU Load
-
- Bitcraze
- Posts: 630
- Joined: Tue Jun 30, 2015 7:47 am
Re: CPU Load
The easiest way to get a feel for the CPU load is to use the python client. Open the console tab and click the "Task dump" button. You should get something like:
This is a list of tasks and how much of the CPU time they use, the first column is the the percentage of total CPU time. In this case we can see that the stabalizer loop uses around 7% for instance, and that 70% is unused (IDLE).
Note: the task data is reset after each dump, and the first dump will contain an average from boot time. In most cases you want to dump at least twice, first to reset the data and a second time to get current values.
Code: Select all
SYSLOAD: Task dump
SYSLOAD: Load Stack left Name
SYSLOAD: 3.37 183 Tmr Svc
SYSLOAD: 69.85 127 IDLE
SYSLOAD: 1.61 213 CRTP-RX
SYSLOAD: 6.80 155 SENSORS
SYSLOAD: 0.0 75 PWRMGNT
SYSLOAD: 0.0 115 PLATFORM-
SYSLOAD: 0.0 255 LOG
SYSLOAD: 0.0 223 MEM
SYSLOAD: 0.0 91 PARAM
SYSLOAD: 0.01 67 LH
SYSLOAD: 0.09 99 SYSTEM
SYSLOAD: 0.09 61 CRTP-TX
SYSLOAD: 7.34 365 STABILIZE
SYSLOAD: 4.88 327 KALMAN
SYSLOAD: 2.43 93 LEDSEQCMD
SYSLOAD: 1.05 107 CRTP-SRV
SYSLOAD: 2.42 176 SYSLINK
SYSLOAD: 0.0 114 USBLINK
SYSLOAD: 0.0 255 CMDHL
Note: the task data is reset after each dump, and the first dump will contain an average from boot time. In most cases you want to dump at least twice, first to reset the data and a second time to get current values.
-
- Member
- Posts: 40
- Joined: Wed Jan 20, 2021 4:03 pm
Re: CPU Load
Thanks found it, also thanks for explaining the IDLE as my guess already was unused space but a conformation is always nice!