From patchwork Wed Jun 19 14:58:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weston Andros Adamson X-Patchwork-Id: 2749921 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 59011C0AB1 for ; Wed, 19 Jun 2013 14:58:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5055C2039A for ; Wed, 19 Jun 2013 14:58:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C4C6203A2 for ; Wed, 19 Jun 2013 14:58:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756762Ab3FSO6g (ORCPT ); Wed, 19 Jun 2013 10:58:36 -0400 Received: from mx12.netapp.com ([216.240.18.77]:49114 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756651Ab3FSO6f (ORCPT ); Wed, 19 Jun 2013 10:58:35 -0400 X-IronPort-AV: E=Sophos;i="4.87,896,1363158000"; d="scan'208";a="66286033" Received: from smtp2.corp.netapp.com ([10.57.159.114]) by mx12-out.netapp.com with ESMTP; 19 Jun 2013 07:58:35 -0700 Received: from vpn2ntap-119838.vpn.netapp.com (vpn2ntap-119838.vpn.netapp.com [10.55.75.110]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id r5JEwYE6006230; Wed, 19 Jun 2013 07:58:34 -0700 (PDT) From: Weston Andros Adamson To: SteveD@redhat.com Cc: linux-nfs@vger.kernel.org, Weston Andros Adamson Subject: [PATCH] nfsiostat: restore output format Date: Wed, 19 Jun 2013 10:58:33 -0400 Message-Id: <1371653913-1697-1-git-send-email-dros@netapp.com> X-Mailer: git-send-email 1.7.12.4 (Apple Git-37) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP recent changes to support python 3 changed the output of nfsiostat from: read: ops/s kB/s kB/op retrans avg RTT (ms) avg exe (ms) 48.094 2889.133 60.072 0 (0.0%) 177.160 184.833 ... to: read: ops/s kB/s kB/op retrans avg RTT (ms) avg exe (ms) 0.000 0.000 0.000 0 (0.0%) 0.000 0.000 ... Signed-off-by: Weston Andros Adamson --- tools/nfs-iostat/nfs-iostat.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py index dfbef87..c035537 100644 --- a/tools/nfs-iostat/nfs-iostat.py +++ b/tools/nfs-iostat/nfs-iostat.py @@ -353,14 +353,14 @@ class DeviceData: exe_per_op = 0.0 op += ':' - print('%s' % op.lower().ljust(15)) + print('%s' % op.lower().ljust(15), end='') print(' ops/s\t\t kB/s\t\t kB/op\t\tretrans\t\tavg RTT (ms)\tavg exe (ms)') - print('\t\t%7.3f' % (ops / sample_time)) - print('\t%7.3f' % (kilobytes / sample_time)) - print('\t%7.3f' % kb_per_op) - print(' %7d (%3.1f%%)' % (retrans, retrans_percent)) - print('\t%7.3f' % rtt_per_op) + print('\t\t%7.3f' % (ops / sample_time), end='') + print('\t%7.3f' % (kilobytes / sample_time), end='') + print('\t%7.3f' % kb_per_op, end='') + print(' %7d (%3.1f%%)' % (retrans, retrans_percent), end='') + print('\t%7.3f' % rtt_per_op, end='') print('\t%7.3f' % exe_per_op) def ops(self, sample_time): @@ -392,7 +392,7 @@ class DeviceData: print() print(' op/s\t\trpc bklog') - print('%7.2f' % (sends / sample_time)) + print('%7.2f' % (sends / sample_time), end='') print('\t%7.2f' % backlog) if which == 0: