Data-Science-Wiki icon indicating copy to clipboard operation
Data-Science-Wiki copied to clipboard

difference between Formula and Code

Open zhaoxi2000 opened this issue 6 years ago • 0 comments

https://github.com/Leo-G/DevopsWiki/wiki/How-Linux-CPU-Usage-Time-and-Percentage-is-calculated

Formula
Total CPU Idle time since boot = idle + iowait
Total CPU usage time since boot = Total CPU time since boot - Total CPU Idle time since boot
IDLE=${CPU[3]} # Just the idle CPU time.
let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"

Where is the IO_WAIT not in Total_CPU_Idel_Time? What is the meaning "+5" ?

zhaoxi2000 avatar Nov 17 '18 18:11 zhaoxi2000