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.