[PATCH uq/master] kvm_stat: add option to display non tracepoint based stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The old stats contain information not available in the tracepoints.

Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

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)
 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux