Calculating kernel/user/idle time

Peter Steele psteele at
Fri Mar 5 21:14:11 UTC 2010

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.

More information about the freebsd-questions mailing list