This shows events with history in preference to events with none.

Signed-off-by: Avi Kivity <a...@redhat.com>
---
 kvm/kvm_stat |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kvm/kvm_stat b/kvm/kvm_stat
index e32df14..4a16277 100755
--- a/kvm/kvm_stat
+++ b/kvm/kvm_stat
@@ -308,9 +308,9 @@ def tui(screen, stats):
         s = stats.get()
         def sortkey(x):
             if s[x][1]:
-                return -s[x][1]
+                return (-s[x][1], -s[x][0])
             else:
-                return x
+                return (0, -s[x][0])
         for key in sorted(s.keys(), key = sortkey):
             if row >= screen.getmaxyx()[0]:
                 break
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to