* [PATCH uq/master] kvm_stat: add option to display non tracepoint based stats
@ 2014-05-20 18:38 Marcelo Tosatti
2014-05-21 10:45 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2014-05-20 18:38 UTC (permalink / raw)
To: kvm-devel, Paolo Bonzini
The old stats contain information not available in the tracepoints.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index 762544b..6ac3b21 100755
--- a/scripts/kvm/kvm_stat
+++ b/scripts/kvm/kvm_stat
@@ -493,12 +493,21 @@ options.add_option('-f', '--fields',
dest = 'fields',
help = 'fields to display (regex)',
)
+options.add_option('-o', '--old',
+ action = 'store_true',
+ default = False,
+ dest = 'old',
+ help = 'show kvm statistics counters (not tracepoint based)',
+ )
(options, args) = options.parse_args(sys.argv)
-try:
- provider = TracepointProvider()
-except:
+if options.old:
provider = DebugfsProvider()
+else:
+ try:
+ provider = TracepointProvider()
+ except:
+ provider = DebugfsProvider()
stats = Stats(provider, fields = options.fields)
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH uq/master] kvm_stat: add option to display non tracepoint based stats
2014-05-20 18:38 [PATCH uq/master] kvm_stat: add option to display non tracepoint based stats Marcelo Tosatti
@ 2014-05-21 10:45 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2014-05-21 10:45 UTC (permalink / raw)
To: Marcelo Tosatti, kvm-devel
Il 20/05/2014 20:38, Marcelo Tosatti ha scritto:
>
> The old stats contain information not available in the tracepoints.
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>
> diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
> index 762544b..6ac3b21 100755
> --- a/scripts/kvm/kvm_stat
> +++ b/scripts/kvm/kvm_stat
> @@ -493,12 +493,21 @@ options.add_option('-f', '--fields',
> dest = 'fields',
> help = 'fields to display (regex)',
> )
> +options.add_option('-o', '--old',
> + action = 'store_true',
> + default = False,
> + dest = 'old',
> + help = 'show kvm statistics counters (not tracepoint based)',
> + )
> (options, args) = options.parse_args(sys.argv)
>
> -try:
> - provider = TracepointProvider()
> -except:
> +if options.old:
> provider = DebugfsProvider()
> +else:
> + try:
> + provider = TracepointProvider()
> + except:
> + provider = DebugfsProvider()
>
> stats = Stats(provider, fields = options.fields)
>
>
Let's instead show information from both providers. I am sending a patch.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-21 10:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20 18:38 [PATCH uq/master] kvm_stat: add option to display non tracepoint based stats Marcelo Tosatti
2014-05-21 10:45 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox