I want to get the CPU and memory usage of a single process on Linux - I know the PID. Hopefully, I can get it every second and write it to a CSV using the \'watch\' command
CPU and memory usage of a single process on Linux or you can get the top 10 cpu utilized processes by using below command
ps -aux --sort -pcpu | head -n 11