tools/kvm_stat: handle guest removals more gracefully
authorStefan Raspl <stefan.raspl@de.ibm.com>
Fri, 24 Aug 2018 12:03:59 +0000 (14:03 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Thu, 30 Aug 2018 15:15:12 +0000 (17:15 +0200)
commit29c39f38e4e8dbf0497e81db6c985ee59259f002
tree9699cab1e002fa6b34ac5f942dcdf8fc1e130d79
parent0db8b3102368755242b44f2b30f93302c70e8e82
tools/kvm_stat: handle guest removals more gracefully

When running with the DebugFS provider, removal of a guest can result in a
negative CurAvg/s, which looks rather confusing.
If so, suppress the body refresh and print a message instead.
To reproduce, have at least one guest A completely booted. Then start
another guest B (which generates a huge amount of events), then destroy B.
On the next refresh, kvm_stat should display a whole lot of negative values
in the CurAvg/s column.

Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
tools/kvm/kvm_stat/kvm_stat