I'm running a resource intensive python application but would like to know the CPU usage of this application constantly every 5 seconds and dispay the results.
I use mpstat -P ALL
but I need to rerun this command every 5 seconds.
Is there a way to poll and display the results constantly every 5 seconds. I would like to format the output as well.
watch -n 5 mpstat -P ALL
from a terminal window. – Terrance Nov 17 '17 at 00:58top
orhtop
? – user8292439 Nov 17 '17 at 01:11