]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Extend virProcessGetStatInfo() for sysTime and userTime
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 9 Aug 2022 14:15:55 +0000 (16:15 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 5 Sep 2022 11:55:11 +0000 (13:55 +0200)
commitcdc22d9a21e472a02dae8157e3cca5832f161feb
tree1a2599202870aeeb2879309fad07cdee6e19554a
parentb59285e089ad4154792bb192a6582128c1c4ffbb
util: Extend virProcessGetStatInfo() for sysTime and userTime

The virProcessGetStatInfo() helper parses /proc stat file for
given PID and/or TID and reports cumulative cpuTime which is just
a sum of user and sys times. But in near future, we'll need those
times separately, so make the function return them too (if caller
desires).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/ch/ch_driver.c
src/qemu/qemu_driver.c
src/util/virprocess.c
src/util/virprocess.h