mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Show unspecified core as * in sys command
This commit is contained in:
parent
ea8463ed70
commit
e389d717d6
@ -145,9 +145,9 @@ void doCommand(String str, bool echo = false) {
|
|||||||
uint32_t totalRunTime;
|
uint32_t totalRunTime;
|
||||||
uxTaskGetSystemState(systemState, taskCount, &totalRunTime);
|
uxTaskGetSystemState(systemState, taskCount, &totalRunTime);
|
||||||
for (int i = 0; i < taskCount; i++) {
|
for (int i = 0; i < taskCount; i++) {
|
||||||
int core = systemState[i].xCoreID == tskNO_AFFINITY ? -1 : systemState[i].xCoreID;
|
String core = systemState[i].xCoreID == tskNO_AFFINITY ? "*" : String(systemState[i].xCoreID);
|
||||||
int cpuPercentage = systemState[i].ulRunTimeCounter / (totalRunTime / 100);
|
int cpuPercentage = systemState[i].ulRunTimeCounter / (totalRunTime / 100);
|
||||||
print("%-5d%-20s%-7d%-6d%-6d%d\n",systemState[i].xTaskNumber, systemState[i].pcTaskName,
|
print("%-5d%-20s%-7d%-6d%-6s%d\n",systemState[i].xTaskNumber, systemState[i].pcTaskName,
|
||||||
systemState[i].usStackHighWaterMark, systemState[i].uxCurrentPriority, core, cpuPercentage);
|
systemState[i].usStackHighWaterMark, systemState[i].uxCurrentPriority, core, cpuPercentage);
|
||||||
}
|
}
|
||||||
delete[] systemState;
|
delete[] systemState;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user