From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7072-0003PB-K1 for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:14:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a706y-0003vU-Ig for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:14:20 -0500 Received: from e06smtp05.uk.ibm.com ([195.75.94.101]:49355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a706y-0003v2-8h for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:14:16 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 10 Dec 2015 12:14:14 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id AAE702190063 for ; Thu, 10 Dec 2015 12:13:51 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tBACDx9O066028 for ; Thu, 10 Dec 2015 12:13:59 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tBACDwKB025485 for ; Thu, 10 Dec 2015 05:13:58 -0700 From: Janosch Frank Date: Thu, 10 Dec 2015 13:12:58 +0100 Message-Id: <1449749584-23214-29-git-send-email-frankja@linux.vnet.ibm.com> In-Reply-To: <1449749584-23214-1-git-send-email-frankja@linux.vnet.ibm.com> References: <1449749584-23214-1-git-send-email-frankja@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 28/34] scripts/kvm/kvm_stat: Fix output formatting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: cornelia.huck@de.ibm.com, frankja@linux.vnet.ibm.com The key names in log mode were capped to 10 characters which is not enough for distinguishing between keys. Capping was therefore removed. In batch mode the spacing between keys and values was too narrow and therefore had to be extended to 42. --- scripts/kvm/kvm_stat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat index 4968941..aa3de71 100755 --- a/scripts/kvm/kvm_stat +++ b/scripts/kvm/kvm_stat @@ -599,13 +599,13 @@ def batch(stats): s = stats.get() for key in sorted(s.keys()): values = s[key] - print '%-22s%10d%10d' % (key, values[0], values[1]) + print '%-42s%10d%10d' % (key, values[0], values[1]) def log(stats): keys = sorted(stats.get().iterkeys()) def banner(): for k in keys: - print '%10s' % k[0:9], + print '%s' % k, print def statline(): s = stats.get() -- 2.3.0