What's the proper way to calculate kernel/user/idle time? I know the raw values come from sysctl kern.cp_time, but these values need to be "massaged" based on the number of CPUs and so on. Can someone explain briefly what the algorithm is calculating the final percentages representing these times.