1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Make dev.cpu.X.cx_usage sysctl also report current average of sleep time.

This commit is contained in:
Alexander Motin 2009-05-03 06:25:37 +00:00
parent bb1d6ad5b3
commit 2500b6d96d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191764

View File

@ -1105,8 +1105,9 @@ acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS)
sbuf_printf(&sb, "%u.%02u%% ", (u_int)(whole / sum),
(u_int)(fract / sum));
} else
sbuf_printf(&sb, "0%% ");
sbuf_printf(&sb, "0.00%% ");
}
sbuf_printf(&sb, "last %dus", sc->cpu_prev_sleep);
sbuf_trim(&sb);
sbuf_finish(&sb);
sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req);