weranaughty.blogg.se

Linux cpu utilization command
Linux cpu utilization command









linux cpu utilization command

It shows a specific usage of a process when you specify a -cpu=list option. Unfortunately, this approach does not seem to be 100% reliable, sometimes i see that in the first case, the two working threads are reported to be separated to each CPU core, or in the latter case, the two threads are reported to be on the same core. You can process the output and calculate the total CPU for each CPU core.

linux cpu utilization command

Running the same python script in jython, we see, that the script is utilizing both cores (and there are many other service or whatever threads, which are almost idle): $ ps -p 28671 -L -o pid,tid,psr,pcpu You see that the threads are running on the same cpu core (because of GIL) (PSR is CPU id the thread is currently assigned to) having python process with two busy threads on dual core CPU: $ ps -p 29492 -L -o pid,tid,psr,pcpu











Linux cpu utilization command