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
ps aux|awk '{print $2,$3,$4}'|grep PID
where the first column is the PID,second column CPU usage ,third column memory usage.