Install the package apt install dstat -y use nohup to run the dstat nohup dstat -c --top-cpu -d --top-bio --top-latency --output systemstats.csv & end the nohup ps -ef |grep nohup if the process ID == 22182 kill -9 22182