Reputation: 31
If my PC has four CPUs(CPU0, CPU1, CPU2, CPU3), how can I know the number of running processes and the queue length of each CPU?
Upvotes: 1
Views: 4680
Reputation: 191
Look at /sys/kernel/debug/sched/debug file. Same as /proc/sched_debug from the previous answer. In my case in proc folder there was no sched_debug, but found the same content in the mentioned path.
Upvotes: 3
Reputation: 1130
Look at the /proc/stat and /proc/schedstat files. There is also information per process in /proc/<pid>/stat.
Upvotes: 0
Reputation: 1828
In /proc/sched_debug you can see for each cpu:
the runnable processes (runnable tasks)
cat /proc/sched_debug | less
Upvotes: 2