Page 1 of 1

shows CPU and I/O current load on screen

Posted: Thu Sep 06, 2018 6:47 pm
by snahmad75
Hi,

Anyone knows how can I get CPU load or both cores and shows in my screen using debug logs on esp32.
I need to show current CPU load and I/O load in percentage.

Re: shows CPU and I/O current load on screen

Posted: Thu Sep 06, 2018 10:00 pm
by jcsbanks

Code: Select all

			//CPU usage & task list
			char * buf=malloc(1000);
			vTaskGetRunTimeStats(buf);
			shims.print("%s\n",buf);
			vTaskList(buf);
			shims.print("%s",buf);
			free(buf);
	
			//Timers
			esp_timer_dump(stdout);
			shims.print("\n");
	
			//Heap
			shims.print("heap_free_size %d\n",heap_caps_get_free_size(MALLOC_CAP_8BIT));
Quick and dirty snippet I was using during some debugging to print out info to the terminal periodically. Just change shims.print to printf.

Re: shows CPU and I/O current load on screen

Posted: Fri Sep 07, 2018 7:14 pm
by snahmad75
Do you it shows columns data without columns headers.
do you columns header.

How to show which task is running to which cpu core in dual core mode.