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
You could use top -b and grep out the pid you want (with the -b flag top runs in batch mode), or also use the -p flag and specify the pid without using grep.