From nobody Sat Jan 20 01:55:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TH01g3zqwz57tk9; Sat, 20 Jan 2024 01:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TH01g3RHJz4fXl; Sat, 20 Jan 2024 01:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705715735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qig/jP2AhPGDTbOD+cGxSd9q6KnLDOwrBdc3BA2omnA=; b=y0WX5QyJIGXH0PFF+/8FKLxFOYTjlPKMdhsowmJcxm+zl/PIZ3hpaLCJe+6D02Q/VGRbj5 DhR52p72E334z9WBS4PLubEotTLy4RFgpwI8PJzG0oKwwhJ5DdD6YKVCRd1PsHW+0X7ZL5 rpcRzWjT9397plBkxZ7kTYwlvrPjSqKhS0nYXY0p0rE4qhH2NRDMIw3GKAYYTJn+4s2zmw sCWjqjQ0YMQMFIWCFqAwtzCkl+a+X+BvC9sX0s93Q5THNlF4Jib59m2tcT4AP701D3OhFf /SH1ux/qYewEJvlguzemj9hr3hb/GcvCm/jXv1A76xrlQ+G/AzJAm9R5oL8Vew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705715735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qig/jP2AhPGDTbOD+cGxSd9q6KnLDOwrBdc3BA2omnA=; b=H6Ene6Ck2hxgq3722+VXCuuad4Sq+qwTRdheY5ye9kX3N1E5h74QsBOA0+JP2fKGhiyavG LfTGJykvdYQF8iKs551ROA4//bqP5xiX+UMhtxDV3z/T9BHArqqrn2LYq07NTfonqI+drG 6G9MdB0FkVRLJyzfrAK39wVOghVTjXsirm0CnsZwZ9XUQFn4QW+GHpTbtJeN0oXsqsRbeO zn2iKWgJ8Pr3KBvvc/nwMHDdMdzmb3BjYhYj6j8sRmavnYxV6JQpsLP0tHz6b8UBUHiTh1 iVu8H1eHMzDv6Ty1KKGRh73bRV7s7z97lnzTsMnpfUsbjlED4Uv9Uec2cN8oJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705715735; a=rsa-sha256; cv=none; b=v9kz9XVKyIgxUQywohOrJe75WDWN4C84Rc3wE9GyrWKYrKfhnEdu56MWDDj2YarGz2zBoV c3WVLm95bMi+RC4yBg+i+pxwxDIpMLXaGzOe/+RQbJxsUJta4cwKEN/On/e5qlTOz5+aBV Tjr6+gHZ6HUmCNQDCcodAsz5H7wgqWUQtB6UU0txOf0qu/JNzdTB27KJh4pHi8G5DCWCn3 PFYR0B3iUu+cpz1JnbeU8rZDg5B0SWcFtBJD8PuqeROLU76eHaTny4UJoWqLzZIbtdFYTj wO9v2PfUG4umY5S7Z4PAibtIeBzFWQNL8Nof+ysHq+ONNyyM2oe0UhF+TQmMww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TH01g2VYfzG16; Sat, 20 Jan 2024 01:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40K1tZ1Q072793; Sat, 20 Jan 2024 01:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40K1tZQY072790; Sat, 20 Jan 2024 01:55:35 GMT (envelope-from git) Date: Sat, 20 Jan 2024 01:55:35 GMT Message-Id: <202401200155.40K1tZQY072790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: d741d23133be - stable/14 - nfsstat: make -q work without -e/-E List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d741d23133be4770f4b870bd6d056080f1857c89 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d741d23133be4770f4b870bd6d056080f1857c89 commit d741d23133be4770f4b870bd6d056080f1857c89 Author: Lexi Winter AuthorDate: 2023-12-28 12:56:57 +0000 Commit: Alan Somers CommitDate: 2024-01-20 01:55:26 +0000 nfsstat: make -q work without -e/-E MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/961 (cherry picked from commit f79b200b6aefb9bdcbe931c5b7ea604e259beee0) --- usr.bin/nfsstat/nfsstat.1 | 4 ++-- usr.bin/nfsstat/nfsstat.c | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/usr.bin/nfsstat/nfsstat.1 b/usr.bin/nfsstat/nfsstat.1 index f51e2662636d..200b2fc2f6ef 100644 --- a/usr.bin/nfsstat/nfsstat.1 +++ b/usr.bin/nfsstat/nfsstat.1 @@ -27,7 +27,7 @@ .\" .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" -.Dd December 27, 2023 +.Dd December 28, 2023 .Dt NFSSTAT 1 .Os .Sh NAME @@ -119,7 +119,7 @@ second intervals. .It Fl z Reset statistics after displaying them. .It Fl q -Do not print header +Do not print headers. .It Fl -libxo Generate output via .Xr libxo 3 diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index 12a80c721dbd..58ed44d3fe22 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -282,7 +282,8 @@ intpr(int clientOnly, int serverOnly) xo_emit("{T:Client Info:\n"); xo_open_container("operations"); - xo_emit("{T:Rpc Counts:}\n"); + if (printtitle) + xo_emit("{T:Rpc Counts:}\n"); xo_emit("{T:Getattr/%13.13s}{T:Setattr/%13.13s}" "{T:Lookup/%13.13s}{T:Readlink/%13.13s}" @@ -333,7 +334,8 @@ intpr(int clientOnly, int serverOnly) xo_close_container("operations"); xo_open_container("rpcs"); - xo_emit("{T:Rpc Info:}\n"); + if (printtitle) + xo_emit("{T:Rpc Info:}\n"); xo_emit("{T:TimedOut/%13.13s}{T:Invalid/%13.13s}" "{T:X Replies/%13.13s}{T:Retries/%13.13s}" @@ -349,7 +351,8 @@ intpr(int clientOnly, int serverOnly) xo_close_container("rpcs"); xo_open_container("cache"); - xo_emit("{T:Cache Info:}\n"); + if (printtitle) + xo_emit("{T:Cache Info:}\n"); xo_emit("{T:Attr Hits/%13.13s}{T:Attr Misses/%13.13s}" "{T:Lkup Hits/%13.13s}{T:Lkup Misses/%13.13s}" @@ -396,7 +399,8 @@ intpr(int clientOnly, int serverOnly) if (serverOnly) { xo_open_container("serverstats"); - xo_emit("{T:Server Info:}\n"); + if (printtitle) + xo_emit("{T:Server Info:}\n"); xo_open_container("operations"); xo_emit("{T:Getattr/%13.13s}{T:Setattr/%13.13s}" @@ -449,7 +453,8 @@ intpr(int clientOnly, int serverOnly) xo_open_container("server"); - xo_emit("{T:Server Write Gathering:/%13.13s}\n"); + if (printtitle) + xo_emit("{T:Server Write Gathering:/%13.13s}\n"); xo_emit("{T:WriteOps/%13.13s}{T:WriteRPC/%13.13s}" "{T:Opsaved/%13.13s}\n"); @@ -465,7 +470,8 @@ intpr(int clientOnly, int serverOnly) xo_close_container("server"); xo_open_container("cache"); - xo_emit("{T:Server Cache Stats:/%13.13s}\n"); + if (printtitle) + xo_emit("{T:Server Cache Stats:/%13.13s}\n"); xo_emit("{T:Inprog/%13.13s}" "{T:Non-Idem/%13.13s}{T:Misses/%13.13s}\n"); xo_emit("{:inprog/%13ju}{:nonidem/%13ju}{:misses/%13ju}\n",