kvm: add flightrecorder script
commitb3c09bde4842f1b157bc4431135aad4f2031e312
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 9 Mar 2012 14:13:40 +0000 (9 14:13 +0000)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 12 Apr 2012 22:01:41 +0000 (12 19:01 -0300)
tree3a7033ec3616726d6b01f34a4cdc17c15aa091fe
parentdadc1064c348545695b8a14d9dc72ccaa2983be7
kvm: add flightrecorder script

The kvm kernel module includes a number of trace events which can be
useful when debugging system behavior.  Even on production systems these
trace events can be used to observe guest behavior and identify the
source of problems.

The kvm_flightrecorder script is a command-line wrapper for the
/sys/kernel/debug/tracing interface.  Kernel symbols do not need to be
installed.

This script captures a fixed-size buffer of KVM trace events.  Recent
events overwrite the oldest events when the buffer size is exceeded and
it is possible to leave KVM tracing enabled for any period of time with
just a fixed-size buffer.  If the buffer is large enough this script is
a useful tool for collecting detailed information after an issue occurs
with a guest.  Hence the name "flight recorder".

The script can also be used in 'tail' mode to simply view KVM trace
events as they occur.  This is handy for development and to ensure that
the guest is indeed running.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
scripts/kvm/kvm_flightrecorder [new file with mode: 0755]