Skip to content

Display a rolling graph of Task CPU usage inside an ESP32

License

jameszah/ESP32-Task-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-Task-Manager

Display a rolling graph of Task CPU usage inside an ESP32

  • any Arduino program with wifi, just include the taskman.h, call taskman_setup() in the setup(), and it will serve a graph at port 81 of your ip as below with 100 seconds of 1 second averages of all the tasks above 2% utilization on your esp32
  • with 2 cores on the esp32-s (on the ai thinker esp32-cam), the percentages will add to 200%
image

Initial Mention

https://www.reddit.com/r/esp32/comments/1oeq3v6/whats_happening_inside_my_esp32/


Get Started

  • download the .ino and the .h
  • edit your ssid and password into the .ino file
  • install on esp32
  • goto your ip address with port 81, like 192.168.1.111:81
  • then add your own code, and delete the lines that produce the fake load on core 0, core 1, and inside the loop

Other info

Good stuff not added yet

  • killing tasks
  • changing priorities

Endpoints

The endpoints are below - the esp32 keeps track of 100 points, and will deliver that entire series for every task that every exceeded 2% of its core, or for the current data you can just get the last second snapshot of every 2% plus task. The data collector only runs once per second, so 2 fetchs in a second will give you the same data.

http://192.168.1.111:81/dataCurrent
{ "loopTask": 3.1, "IDLE1": 96.6, "IDLE0": 97.8, "BusyTask1": 0, "BusyTask0": 0, "httpd": 0.3, "wifi": 1.4 }

http://192.168.1.111:81/data
{ "loopTask": [3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 2.6, 1.8, 1.8, 2.3, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 2.9, 2.7, 2.7, 2.7, 2.7, 2.7, 2.7, 2.9, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 2.9, 2.7, 2.7, 2.7, 2.3, 1.8, 1.8, 1.8, 1.8, 2.5, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 2.9, 2.7, 2.7, 2.7, 2.3, 2.6, 3.1, 3.1, 3.1, 3.1, 2.3, 2.6, 3.1, 3.1, 3.1, 3.1, 3, 3.1, 2.3, 1.8, 1.8, 2.3, 2.7, 2.7, 2.7, 2.9, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.1], "IDLE1": [96.9, 96.9, 96.9, 96.5, 96.9, 96.9, 58.7, 2.4, 2.3, 40.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 61, 13.1, 13.5, 13.5, 13.5, 13.5, 13.5, 50.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.6, 56, 13.1, 13.2, 13.2, 8.9, 2.3, 2.6, 2.4, 2.4, 51.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 96.9, 49.8, 13.2, 13.2, 13.2, 8.1, 56.7, 96.9, 96.5, 96.3, 96.6, 41.3, 57.9, 96.3, 96.6, 96.6, 96.1, 93.4, 96.6, 39.3, 2.7, 2.4, 8.6, 13.1, 13.2, 13.1, 65.9, 96.6, 96.6, 96.6, 96.6, 96.6, 96.6, 96.6, 96.6, 96.6, 96.6, 96.6, 96.6, 96.6], "IDLE0": [97.3, 97.4, 97.8, 95.7, 97.3, 97.9, 98, 97.8, 97.9, 97.7, 98, 98.2, 97.8, 97.2, 96, 81.1, 50, 50.6, 50.9, 49.9, 50, 50.2, 50.2, 67.8, 98.2, 97.9, 98, 97.8, 97.4, 97.2, 97.8, 98.1, 80.1, 50.8, 51.1, 51.3, 50.4, 51.1, 51.1, 50.6, 51, 70.7, 97.8, 98.3, 98.3, 98.1, 98.3, 98.1, 98.1, 97.7, 97.9, 98.1, 98, 98, 98.1, 97.9, 98, 76.2, 51.3, 51.1, 50.9, 51.1, 51.3, 50.6, 51, 74.2, 98.2, 98.3, 97.5, 96.9, 97.4, 97.7, 97.4, 97, 97.4, 97.4, 96.7, 97.8, 97.2, 96.6, 97.2, 97, 71.7, 50.5, 50.4, 50.4, 50.4, 50.4, 50, 49.5, 76.9, 97.6, 97.1, 97, 97.5, 97.7, 97.5, 97.6, 96.1, 95.4], "BusyTask1": [0, 0, 0, 0, 0, 0, 38.7, 95.8, 95.9, 56.8, 0, 0, 0, 0, 0, 0, 36.1, 84.2, 83.8, 83.8, 83.8, 83.8, 83.8, 46.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41.1, 84.1, 84.1, 84.1, 88.8, 95.7, 95.6, 95.8, 95.9, 45.6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47.3, 84.1, 84.1, 84.1, 89.6, 40.7, 0, 0, 0, 0, 56.3, 39.2, 0, 0, 0, 0, 0, 0, 58.1, 95.2, 95.5, 88.8, 84, 83.8, 83.9, 30.8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "BusyTask0": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15.9, 47.2, 47.1, 47.2, 47.2, 47.3, 47.3, 47.1, 30.1, 0, 0, 0, 0, 0, 0, 0, 0, 18.3, 47, 47.2, 47.2, 47, 47.2, 47.4, 47.3, 47.2, 27.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22.1, 47.1, 47.2, 47.2, 47.2, 47.3, 47.3, 47.4, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25.6, 47.1, 47, 46.9, 47.1, 47, 47, 46.6, 20.1, 0, 0, 0, 0, 0, 0, 0, 0, 0], "httpd": [0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.4, 0.6, 0.3, 0, 0.3, 0.6, 0.3, 0.3, 0.8, 3.6, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3], "wifi": [1.8, 1.6, 1.4, 2.8, 1.8, 1.2, 1.3, 1.4, 1.4, 1.5, 1.3, 1.2, 1.4, 1.7, 2.4, 1.9, 1.7, 1.4, 1.2, 1.9, 1.7, 1.5, 1.8, 1.3, 1.2, 1.3, 1.3, 1.5, 1.6, 1.7, 1.4, 1.2, 1.1, 1.4, 1.1, 1, 1.8, 1.1, 0.9, 1.4, 1.1, 1.1, 1.5, 1.1, 1.1, 1.3, 1.1, 1.2, 1.2, 1.6, 1.4, 1.2, 1.3, 1.4, 1.2, 1.3, 1.3, 1.1, 1, 1.1, 1.3, 1.1, 0.9, 1.4, 1.1, 1.2, 1.2, 1.1, 1.7, 2.1, 1.8, 1.6, 1.8, 2.1, 1.7, 1.8, 2.2, 1.4, 1.9, 2.4, 1.9, 2, 1.8, 1.6, 1.7, 1.8, 1.7, 1.7, 2, 2.5, 2, 1.6, 1.9, 2, 1.6, 1.5, 1.7, 1.6, 2.5, 3] }

About

Display a rolling graph of Task CPU usage inside an ESP32

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published