From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] expose per-vm statistics via debugfs Date: Thu, 20 Aug 2009 15:09:48 +0300 Message-ID: <4A8D3D0C.4060001@redhat.com> References: <5e93dcec0908190553k5b7e55aak9987e94b5bdb1893@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Ryota Ozaki Return-path: Received: from mx1.redhat.com ([209.132.183.28]:12710 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753622AbZHTMJu (ORCPT ); Thu, 20 Aug 2009 08:09:50 -0400 In-Reply-To: <5e93dcec0908190553k5b7e55aak9987e94b5bdb1893@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/19/2009 03:53 PM, Ryota Ozaki wrote: > Hi, > > This patch let kvm exposes per-vm statistics about > such as the total number of vm exits, via debugfs. > > Existing kvm already collects the per-vm statistics, > but it has no interface to expose them to users. > This patch creates directories named a pid of the > corresponding vm in debugfs of kvm, containing the > same files that original debugfs exposes. > > The per-vm statistics are useful to know activities > of vms (and to identify anomalous vms for example) > with more detailed information than cpu and memory > usage, and network traffics. And also the patch > introduces no performance overhead, thus, it should > be familiar with online operations, e.g., dynamic > adaptation of assigning vm resources using the > statistics. > > Note that this patch requires a trivial modification > to kvm_stat script. Once this patch is accepted I will > send a patch for it. > > Thanks, > ozaki-r > > My plan is to completely remove the current statistics in favour of tracepoints. You can already display tracepoint statistics with 'perf stat' (see tools/perf); tracepoints have the advantage that they can be completely disabled at runtime and thus have no performance impact. -- error compiling committee.c: too many arguments to function