]> granicus.if.org Git - procps-ng/commit
vmstat: add guest time to stat
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 28 Apr 2021 08:51:34 +0000 (18:51 +1000)
committerCraig Small <csmall@dropbear.xyz>
Wed, 28 Apr 2021 08:51:34 +0000 (18:51 +1000)
commit2461bb5bc17ee4bc01b142b5bba2c5d87578285c
tree4a92cd636bac4366da652282c07577c6312f15bb
parent2dcbe71f3b8e3586acab0221b2e4c55d10cf8f76
vmstat: add guest time to stat

Since 2.6.24/33 the kernel knows about guest and guest nice time. That
is the time that is spend in KVM guests. To handle userspace programs
that do not know about this the guest time is also added to user.

Let us provide a guest time column in vmstat that collects both guest
and guest nice into a gu value.

We also subtract that value from the user time as we are now aware of
the guest value.

This commit is different to !113 in several ways:
 * newlib already knows about these to values
 * vmstat summary already shows these values
 * non-wide vmstat squishes the values

So its around the wide vmstat output.

References:
 procps-ng/procps!113
Signed-off-by: Craig Small <csmall@dropbear.xyz>
vmstat.8
vmstat.c