DavidPostill's comment is correct: they stand for user and system, respectively. To prove it, let's look at the code.
We find the string "CPU Utilization" in iperf_locale.c
. This file appears to have all the language-specific strings, and the variable for the line that reports CPU usage is called report_cpu
.
const char report_cpu[] =
"CPU Utilization: %s/%s %.1f%% (%.1f%%u/%.1f%%s), %s/%s %.1f%% (%.1f%%u/%.1f%%s)\n";
We find that variable used in iperf_api.c
. The function used there seems to be more or less similar to printf
, which takes a format string (our report_cpu
) and replaces all the placeholders in it with a human-readable version of the given variables.
iperf_printf(test, report_cpu, report_local, test->sender?report_sender:report_receiver, test->cpu_util[0], test->cpu_util[1], test->cpu_util[2], report_remote, test->sender?report_receiver:report_sender, test->remote_cpu_util[0], test->remote_cpu_util[1], test->remote_cpu_util[2]);
The fourth and fifth placeholders, the %.1f
s inside the parentheses, are what we're investigating. It looks like the first two parameters to the function are some kind of context and the template string, respectively, so we'll start counting at the report_local
one. The fourth is test->cpu_util[1]
. Some digging reveals that these three-valued cpu_util
arrays are generated in iperf_util.c
. The interesting part is at the very end of the cpu_util
function:
pcpu[0] = (((ctemp - clast) * 1000000.0 / CLOCKS_PER_SEC) / timediff) * 100;
pcpu[1] = (userdiff / timediff) * 100;
pcpu[2] = (systemdiff / timediff) * 100;
Slots 1 and 2 are indeed based on the user time and the system time, respectively, while slot 0 is the total usage.