![Linux command to see cpu usage](https://cdn1.cdnme.se/5447227/9-3/6_64e61dfae087c31b411cc5f3.png)
![linux command to see cpu usage linux command to see cpu usage](https://ostechnix.com/wp-content/uploads/2017/08/Display-number-of-CPU-Cores-in-Linux-using-lscpu-command-1024x518.png)
This will enable process accounting (if not already added). The second way to look for this is to enable process accounting.
![linux command to see cpu usage linux command to see cpu usage](https://www.tecmint.com/wp-content/uploads/2017/06/Limit-CPU-Usage-on-Linux-Process.png)
There is a problem with this, primarily if the box goes into a runaway cpu loop and produces huge load - your not guaranteed that your actual process will execute in a timely manner during load (if at all) so you could actually miss the output! I would suggest this be your first port of call since it produces the most valuable/reliable data to work with. This will give you a quite detailed outlook of the running of the system at ten minute intervals. pidstat -u 600 >/var/log/pidstats.log & disown $! The first way is to setup pidstat to run in the background and produce data. Note that its entirely possible its many processes in a runaway scenario causing this, not just one. There are a couple of possible ways you can do this.
![Linux command to see cpu usage](https://cdn1.cdnme.se/5447227/9-3/6_64e61dfae087c31b411cc5f3.png)