How to collect CPU usage on Linux using Shell script
Following script will help to collect CPU based on on every SAMPLE_TIME. This will help to collect IDLE CPU our from “vmstat” and store them in a file. #Setup SAMPLE_TIME for cpu data collection interval SAMPLE_TIME=5 while true do x=`vmstat | grep -v procs | grep -v swpd | awk ‘{print $15}’` echo `date +”%m-%d-%y…
Read More “How to collect CPU usage on Linux using Shell script” »