Hello,
I was wondering if there is a way to get the stats (current CPU usage, memory usage, etc) for the nRF9160?
Thanks,
Chris
Hello,
I was wondering if there is a way to get the stats (current CPU usage, memory usage, etc) for the nRF9160?
Thanks,
Chris
Hey Chris,
You can enable the thread monitor which will give you rough updates on stack usage and CPU usage.
# Enable thread monitor
# CONFIG_THREAD_ANALYZER=y
# CONFIG_THREAD_ANALYZER_USE_LOG=y
# CONFIG_THREAD_ANALYZER_AUTO=y
# CONFIG_THREAD_ANALYZER_AUTO_INTERVAL=10
The minimum interval I believe is 5 seconds.
jaredwolff is this similar to #include <include/debug/cpu_load.h>
What I sent is more for stack usage (useful for tuning stack sizes). It does indicate, coarsely, how much CPU is being used in each thread.
This seems like a nice tool to determine how much is happening in a certain time span that you have control over. I’m doing a bunch of power optimization stuff right now. If I run into anything else that is useful, I’ll let you know!
jaredwolff Okay sounds good, thanks @jaredwolff !!