Result should be in xx.xx format (like 01.65).
Try the following two command
top -b -n 1|grep Cpu|cut -d " " -f 3 top -b -n 1|grep Cpu|cut -d " " -f 3|cut -d"%" -f 1
top -p pgrep process_name -b -n 1 -d 1.0 |grep -e "^Cpu" |awk {'print $2'} | tr "%us," " " > cpu_file.log
pgrep process_name
I want to run a command in every 10 minute which should return the maximum CPU utilization of a linux machine in last 10 min irrespective of no. of core present. Thanks in advance.