shows CPU and I/O current load on screen

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

shows CPU and I/O current load on screen

Postby snahmad75 » Thu Sep 06, 2018 6:47 pm

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.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

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

Postby jcsbanks » Thu Sep 06, 2018 10:00 pm

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.

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

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

Postby snahmad75 » Fri Sep 07, 2018 7:14 pm

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.

Who is online

Users browsing this forum: No registered users and 73 guests