30 May 2014

continually monitor CPU usage for a command

cmd=[m]oviecrawler;while :; do echo -ne "CPU: `ps aux | grep $cmd | awk '{print $3}'`\\r" ;  sleep 1; done
Post a Comment