Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp957132ybi; Wed, 19 Jun 2019 10:46:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqztHJ7mkcPwH4iPc5KP6oqHEoxFslHWoSFtXCuWZI8Fv5EoPrUUy83s9D7mfCe0COtFib8r X-Received: by 2002:aa7:8dcc:: with SMTP id j12mr62086867pfr.137.1560966387632; Wed, 19 Jun 2019 10:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560966387; cv=none; d=google.com; s=arc-20160816; b=HMPHsm1CRDT0+6tSIgxAxrIxRdmInf++a83pqzK6zfydKUjLA0OBAvEXGFuMStgrAG s9ujuy6v0Q6W2VgnLPz95e8WvU5tZmjVGviDalL1YK42eJzyyUyLhgmgs/iuQwSxe2F4 hPgNHvP/mpcMh18S5YTc0SjXxJ679eQ8T/3TyU+AsLuDw+FFkAI0D0ZPsldox7BRPufG ZWfc43k8y+XY5rzg76VFcjmpCbZM7F0GXjLoBiqoZMCIEqCFtkVJ3xyi+f55s52Dxt6i iwIPr5Yh5xg034Xvx9Wdy9nywSTQ9I1DakPN0Fsuu4auCyj0JsOuZzurFOSsDRNXS3p1 zgtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=5IRPWwML2mq6rBkgmn1j3zeBYZLce+v4cmSDP88Dwpk=; b=jh0gM8q9VLKUAHKcuFzfAv0OgpZ6XmRpXM8mjhK+3ndXhtwmcT3x0vw/a6n5a25Opj RR6eaOsSnOPY/48Fg440zZ314zAHwAFmMeIuFs9QUYjd7+ncFPh2EFNbnpjPuZ5LDZy2 QawpOy7ffKDc8zFC8w4vzQnbRV1TzI8Mq0WpEsRx/3HSG1Di3DcBHlMj8XL5omJRHoK7 y/y6JcGupRrANkvtSXP0p+rCaHhxpEU2HnEBbexs2uCFvFnepYz3SZ3/cTxkDMno5/1C kbILDwiNgMAInHpqnmEe8VF+637292SmMsAQ3hdDXn2GjO2WRV4ITMbVpnDhoaDovPmP NgiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=xHJAQBVh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i18si17081947pfd.64.2019.06.19.10.46.13; Wed, 19 Jun 2019 10:46:27 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=xHJAQBVh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbfFSRqM (ORCPT + 99 others); Wed, 19 Jun 2019 13:46:12 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:43522 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbfFSRqM (ORCPT ); Wed, 19 Jun 2019 13:46:12 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5JHhesx008375; Wed, 19 Jun 2019 17:45:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2018-07-02; bh=5IRPWwML2mq6rBkgmn1j3zeBYZLce+v4cmSDP88Dwpk=; b=xHJAQBVh1Yr1lNQY+B50LlWXm91/mLbv41jLw3dDRgy21cmRgYmHVY9GAzF8ihmih9zZ BuDOhyC0OET9e/9R6hJ1Qxq3aqSvMRzEL40wdOJdU6NpatMHhiOxGosKKY8Spa795FTU woVd0M2SxLWhMhzvNcP9zm+NK1f8ZMkA//OSdf+wvQ5KY5GaL5mdFlLhRs5jD+lPNQfV hKIkd3cCPN3QbLCtmcYtYC94bH91X70tHVwggqwN8gZ1glCJ3dJS65bjRUNspnip24PE dqxXKwjbdZoLUnWSynfhzYqKSPz7kbmuLhe0uVohqhAqB/kmHuA+eKRIzJGVYDf8FDw2 mA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2t7809cvdu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jun 2019 17:45:45 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5JHjcNE146899; Wed, 19 Jun 2019 17:45:45 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2t77yn7xyq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jun 2019 17:45:45 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x5JHjiK6015503; Wed, 19 Jun 2019 17:45:44 GMT Received: from anon-dhcp-171.1015granger.net (/68.61.232.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 19 Jun 2019 10:45:44 -0700 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH 3/3] mountstats: Check for RPC iostats version >= 1.1 with error counts From: Chuck Lever In-Reply-To: <7211D5DF-6923-459D-9B84-2BD264EB9F11@oracle.com> Date: Wed, 19 Jun 2019 13:45:43 -0400 Cc: Steve Dickson , Linux NFS Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190612190229.31811-1-dwysocha@redhat.com> <20190613120314.1864-1-dwysocha@redhat.com> <20190613120314.1864-3-dwysocha@redhat.com> <7211D5DF-6923-459D-9B84-2BD264EB9F11@oracle.com> To: David Wysochanski X-Mailer: Apple Mail (2.3445.104.11) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9293 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906190144 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9293 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906190144 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org > On Jun 19, 2019, at 1:42 PM, Chuck Lever = wrote: >=20 >=20 >=20 >> On Jun 19, 2019, at 1:22 PM, David Wysochanski = wrote: >>=20 >>=20 >>=20 >> On Wed, Jun 19, 2019 at 12:35 PM Chuck Lever = wrote: >>=20 >>=20 >>> On Jun 13, 2019, at 8:03 AM, Dave Wysochanski = wrote: >>>=20 >>> Add explicit check for statsvers instead of array based check. >>=20 >> Hi Dave, >>=20 >> I don't understand why this change is necessary. The patch = description >> should explain. >>=20 >>=20 >> Steve had already taken commit 73491ef for mountstats which was an = array based check. This just makes this patch consistent with the = others. Is that what you mean - you want a statement about consistency = and refer to the other commit? How about: >>=20 >> Commit 73491ef added per-op error counts for mountstats command but = used an array based check rather than checking statsver. Add explicit = check for statsver instead of array based check for consistency with = other tools. >=20 > This is a better patch description (explains "why" not "what"), > but I'm not clear why this change is necessary in either place. In other words, was this change necessary to fix a bug? Or is this a defensive change to make parsing more robust? >>> Signed-off-by: Dave Wysochanski >>> --- >>> tools/mountstats/mountstats.py | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>=20 >>> diff --git a/tools/mountstats/mountstats.py = b/tools/mountstats/mountstats.py >>> index 5f13bf8e..2ebbf945 100755 >>> --- a/tools/mountstats/mountstats.py >>> +++ b/tools/mountstats/mountstats.py >>> @@ -476,7 +476,7 @@ class DeviceData: >>> if retrans !=3D 0: >>> print('\t%d retrans (%d%%)' % (retrans, ((retrans = * 100) / count)), end=3D' ') >>> print('\t%d major timeouts' % stats[3], end=3D'') >>> - if len(stats) >=3D 10 and stats[9] !=3D 0: >>> + if self.__rpc_data['statsvers'] >=3D 1.1 and = stats[9] !=3D 0: >>> print('\t%d errors (%d%%)' % (stats[9], = ((stats[9] * 100) / count))) >>> else: >>> print('') >>> --=20 >>> 2.20.1 >>>=20 >>=20 >> -- >> Chuck Lever >>=20 >>=20 >>=20 >>=20 >>=20 >> --=20 >> Dave Wysochanski >> Principal Software Maintenance Engineer >> T: 919-754-4024 =20 >=20 > -- > Chuck Lever -- Chuck Lever