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
(If you are in MacOS 10.10, try the accumulative -c option of top:
top -c a -pid PID
(This option is not available in other linux, tried with Scientific Linux el6 and RHEL6)