// Sum up the 4 values for User, Nice, System and Idle and calculate // the percentage of idle time (which is part of the 4 values!)$cpuTime = $statData2[0] + $statData2[1] + $statData2[2] + $statData2[3];