From nobody Thu Dec 28 20:27:28 2023 X-Original-To: dev-commits-src-main@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 4T1KnD653Bz54YpB; Thu, 28 Dec 2023 20:27:28 +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 4T1KnD5MBrz4WlX; Thu, 28 Dec 2023 20:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703795248; 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=3BxPO2V6uo2Ft2UnhiM1LuRCjgCe7oSauNnMrBqiTRg=; b=NAYCmnnnUo5vdcvl/y5vicMGMuwn4q8IMlS+FCcCRwxcyIEhQwLoRleUVUqUUvNB2PyO7W 1GOlp8/Iuv2QlF/qVuFoBHqui9m1KtEZ1+9Zmys6GNCSrqXY+VuG8jymG7S7nbbHyjvDXY UouGlSQHRwyp5CHBRHiP9DQog0a5WS2QJDhu8kffr/LVWvx7LVUajZik2lSpowlzQ0vLrn UXXlBiDX+/2GL/7WUxluHCFaGmun+aMDSMpPZ9I0G+3d6/1MuB95DSN0pYiGYh4vnItNBy LuhIJP/eoXhh1UTLIrkBdh9iXwPsnt3iioKiZnLOtfxdPq0owSrOYFDXv9L30w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703795248; a=rsa-sha256; cv=none; b=RI+EVQZdknaFFW50X1FrdrmzIyKERUxtoHXkVJJK7zsfvJpF5ob02XBLQgKbl/4he7XgUe dGut+PitCGxh5b4THRxY05kmTsNr8dJz1KLKimI49a11DoFgOeJwb5Pyrsuo9ouPnS/x8Q jDKYpyeLC8JyQ9/NNkL5tPS6yUMHhY9+tLWf0nIbfn96Z7ptCNNaa44ffGkpx0m4SsxZQu RTd8qc+SRiD7gPcG6x5J3i7PzhpLBXTDvb/PaUAkx/ASJ9U0CaJ5fTfncp10+F3I+IesET 7mRS03odxVPr2puVN82RmuyPdXAHTgJ3lYUttJ56b6CbIRKtRUs0bJIJ2uzboA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703795248; 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=3BxPO2V6uo2Ft2UnhiM1LuRCjgCe7oSauNnMrBqiTRg=; b=k007ZhfrWlDplce15WUXP9rhSlo1B40PHvaJ31BJa1yGoXzqNso/Bc9vkxftiQyEV0XdEM y+phSkfiL4cjgxV+Ja0/ImdLl96MLROeYfE+aWJYdFEEBnhLuldJPZkOXxnxs8BsO4DmHR f7DeJ+h3P/yEJ+5IgpuoAaPPp4TJTMs1haAjUDLMMhv3Xr51Mrf+8DaZ6ZicIcfXA/xPCC E3jdn5Mw9MPa18FhAC0HZudu5vD64GqD5Eo6a7INofZhMv/E5MrJZay+Yl6sdqEy6TeKxn Q4wJfqL4STwJXfIJaiPiwHhxwSk/p1jMKntl6wt/dCvdpAaCX3H7QLphwFUvDA== 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 4T1KnD4KMszcpw; Thu, 28 Dec 2023 20:27:28 +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 3BSKRS25092074; Thu, 28 Dec 2023 20:27:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BSKRSpR092071; Thu, 28 Dec 2023 20:27:28 GMT (envelope-from git) Date: Thu, 28 Dec 2023 20:27:28 GMT Message-Id: <202312282027.3BSKRSpR092071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: f79b200b6aef - main - nfsstat: make -q work without -e/-E List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: f79b200b6aefb9bdcbe931c5b7ea604e259beee0 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f79b200b6aefb9bdcbe931c5b7ea604e259beee0 commit f79b200b6aefb9bdcbe931c5b7ea604e259beee0 Author: Lexi Winter AuthorDate: 2023-12-28 12:56:57 +0000 Commit: Alan Somers CommitDate: 2023-12-28 20:27:07 +0000 nfsstat: make -q work without -e/-E MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/961 --- 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 6b062866ce5a..7d641b50f1ac 100644 --- a/usr.bin/nfsstat/nfsstat.1 +++ b/usr.bin/nfsstat/nfsstat.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 27, 2023 +.Dd December 28, 2023 .Dt NFSSTAT 1 .Os .Sh NAME @@ -117,7 +117,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 8c4df61b0482..55f5573662c7 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -270,7 +270,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}" @@ -321,7 +322,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}" @@ -337,7 +339,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}" @@ -384,7 +387,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}" @@ -437,7 +441,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"); @@ -453,7 +458,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",