Setup pidstat to collect process CPU and memory consumption
git clone https://github.com/ktzyl/os-perf.git
cd os-perf
chmod +x pidstat.sh
./pidstat.sh
// put the job to background by ctrl+z
// bring the job to foreground
fg ./pidstat.sh
// check generated logs
ll /tmp/pidperf/
// stop the job by ctrl+c