Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4222966ybi; Mon, 3 Jun 2019 07:32:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyffLBwmDj6ZAidqadneNJnIAwKsg9QWcu/vdWZisqpeb3vHU+Xm/F31s6uQdJbVjHyanx9 X-Received: by 2002:aa7:825a:: with SMTP id e26mr32010590pfn.255.1559572349844; Mon, 03 Jun 2019 07:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559572349; cv=none; d=google.com; s=arc-20160816; b=zhhNCLP5Na70nQgB48MUw0c8P3jsT9KuOgHHp4XOW1E2DCt2G0y4KwmSKjOUiE6RCc cItDNt+4b8yB/VMHMMcp9hdALSqLdSl96jAq6VhjPuxVEvuOjxssVRkj6zU7uQBYx9XB qisOZOI2YdhWsKPcY2uDGekysWbCi9hfvnA4fwr0tUxz/8U1+mq2ad0/YS+IThuUHYFE rbP7d3LZhrzApOr7jkMTq8ZRj2+E7DMXRaOS8hFyu4Uv4A/mlQyApmwtcxEVskB7907y KlitmL8fqqx1OPHpk4e4RdQ3RQoFmkC9cU124wxLeQQyauMUvxnkz5YXz4li3dzv693w 3y0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=JTAyfzrctoFDj35p3NTdw5IoXHRMmGX/jBezMHuvo0I=; b=o941HTBWtfpypO4SD5ygaBvcdH3itVEmCxHqxXtlGoVI1NNOX+BuO/HmO4rDsYEQOI vtUado9NphpDXST3DVP0GEWiQlVFlmGOoarTUWaqELNKuVQSz6ssf4tKWvVKmKz2qAc/ u56zBIAUGB+ahrgww7aTgGM1FyBEP/eWMxlZeEnOsIPMfEs53SwR2NtnZ/kvBQymJXS0 M0HOqguOqQTNHL1rMoDBscrq+V7Q6KUEA9znRm4QO28l0/u1KY/MV3h9Y9cLP80YBqGr DXkWiWuFrAUv28wiHbQbzdezH+2BRkQBGaMvjMziAGrfar7mUKSIG+yXvL7M8U/PJFU9 KzDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si1043473pgi.430.2019.06.03.07.32.12; Mon, 03 Jun 2019 07:32:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728991AbfFCOcC (ORCPT + 99 others); Mon, 3 Jun 2019 10:32:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29891 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728975AbfFCOcB (ORCPT ); Mon, 3 Jun 2019 10:32:01 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6064A369C4 for ; Mon, 3 Jun 2019 14:32:01 +0000 (UTC) Received: from madhat.boston.devel.redhat.com (ovpn-116-46.phx2.redhat.com [10.3.116.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87FEC60856; Mon, 3 Jun 2019 14:31:57 +0000 (UTC) Subject: Re: [PATCH v2] mountstats: add per-op error counts for mountstats command To: Dave Wysochanski , linux-nfs@vger.kernel.org References: <20190523201351.12232-4-dwysocha@redhat.com> <20190523203344.12487-1-dwysocha@redhat.com> From: Steve Dickson Message-ID: <5e717cc4-f24a-0f83-452f-39167f8e48e3@RedHat.com> Date: Mon, 3 Jun 2019 10:31:57 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190523203344.12487-1-dwysocha@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 03 Jun 2019 14:32:01 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 5/23/19 4:33 PM, Dave Wysochanski wrote: > Display the count of ops completing with error status (status < 0) > on kernels that support it. > > Signed-off-by: Dave Wysochanski > --- > tools/mountstats/mountstats.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Committed... steved. > > diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py > index c7fb8bb1..2f525f4b 100755 > --- a/tools/mountstats/mountstats.py > +++ b/tools/mountstats/mountstats.py > @@ -475,7 +475,9 @@ class DeviceData: > retrans = stats[2] - count > if retrans != 0: > print('\t%d retrans (%d%%)' % (retrans, ((retrans * 100) / count)), end=' ') > - print('\t%d major timeouts' % stats[3]) > + print('\t%d major timeouts' % stats[3], end='') > + if len(stats) >= 10 and stats[9] != 0: > + print('\t%d errors (%d%%)' % (stats[9], ((stats[9] * 100) / count))) > else: > print('') > print('\tavg bytes sent per op: %d\tavg bytes received per op: %d' % \ >