Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp278317lqs; Thu, 13 Jun 2024 09:44:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTezOAt2Xi1m1wsfO7/Em5fCoaLUpnRYcxbrtMTUp245yUtkYcid8anHYuL3CKx/G/Wjvm8xH1ZbKl7xBY7RKCoP+kdIJ4+kRttQQq3w== X-Google-Smtp-Source: AGHT+IGW4VlvcOmVcyP8dqPjZwy8QG2/YoCT5Iei1UQWyDOw24gp7vTACrnJvvrdw5l4QaHNobyW X-Received: by 2002:a05:622a:1909:b0:43f:fc16:6b25 with SMTP id d75a77b69052e-4421609bed1mr6783321cf.27.1718297084080; Thu, 13 Jun 2024 09:44:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718297084; cv=pass; d=google.com; s=arc-20160816; b=OdUnB4EjG3MrISk1iTAo5socMjyjY85XbaL4J+jKDtboPkFx9u5sghpqipawZg5L5K jMpZnFQ6obnGUYDRPSTamwxOebfI83PpK/gM+Qaw6mV60x/f4yDWPV9HEJUS2gLDgqDY pGx85zRyC1zmDR5cMJwmnBqie9rNOwr1Bsy+xAjFwdxiN1iJ4dQCGMQHdpoOFRVF9CBh nPlsv+bgjDQfT25YbFF3mRuXrxd91nkrNpfM74QqlMcMPTrTiFT5n9+42KRSaiMc+v/s CoTffyRfZY15TKU71Onf3n9/rHC8BVMHw7BEcr03IlqnNKnXRN7Y1lJVoDP8x5QEp77T SGsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=RJknIiGQEgkWV3pOdhJR+s2yQTGt1xlQLWJarq6vSDM=; fh=gJt23zIazlnYgccwmQgFJStelvXLWBUa2YNrTMEuxm4=; b=LTmutF+kgfBxtdW9Spletn/Z/snAGN+9ZehxPEqYmk0pEHA9JhS1rrZu9Qqe29DWcM xHqYmAD5hKnuOwvc2nWHSzMf7TrGfkiYp+piUOvBxyspMT6rg1pPXUIFwZfNvzLyblxW S1SxGCDxdQzZW6Qo+b4lAz8taY8mI8cDYpGeZKxJoaIFeCrNxapdRPuLH6RyzA2AYkAH meqj4/xiq1IixO5P790IgPOdo1rjH46eVgpyGE2+Mu2uR/45ysta8v9qVWZOzv3doF/1 dXbM8lIe3f/pHNXvcJ0NbFtdxbsEx12dtpADEfzfoqjGfyLbY1oHHy4JuFvTrd+gEukO 5eqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uyE41NcO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3774-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-441f2ff772bsi17848121cf.621.2024.06.13.09.44.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 09:44:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3774-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uyE41NcO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3774-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B28C71C20CDF for ; Thu, 13 Jun 2024 16:44:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E430B1494B5; Thu, 13 Jun 2024 16:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uyE41NcO" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF896146A79 for ; Thu, 13 Jun 2024 16:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718297068; cv=none; b=AkIR3glp3xvWcYltD7hRGrdRKod5A+kaiCxBN6zQOAgdlBq8iBK0j44/SmUOSQP7IykPHBdNt6ean7r6DJynTAHlJd+eLEDuokS6FDW4wwdoC0hsTnaEg1aLjNQDKYH4CUxRPNjfcS/noDr2++71rG8FZb3pCr0YgmtggTjYuu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718297068; c=relaxed/simple; bh=6qiwxDhQ8FRziLyT7fabl7gPHk/jpXioRkJvkXxPl/Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YnvLAbXbTKM2rjmunOORg6CSZeGL2c1ZGAwJuXSBd8mt2va9n5mMGggyoQu8uleMLRbc/v0zU/bCHQFGYwOHUmeKb1vpmY/1mO5eZzhFg+EcdDgUpr9l/YVM0AOD3f07nitjjEAFL+oVIO0W6bH8TFdEst+9ZdhALrJR0HdImkM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uyE41NcO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88A34C4AF50; Thu, 13 Jun 2024 16:44:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718297068; bh=6qiwxDhQ8FRziLyT7fabl7gPHk/jpXioRkJvkXxPl/Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=uyE41NcOontWUiojSz3cSX2zhAqwPYQSvEqeebndnvPpjhdQ4gVxDBiIcw/Y4V747 ymz5YF6Q/p3F18VWA+aTs2cIymAR9OwzON7K+T8HNsSRl0ZOGS1jS4RnPwKvm+Q7+J rJR+j7PwlKyzUVSmiq+d68QxWgpj98kuRJpp7j+qEulIfVTwVs+9lfPwlkv64lSztH oTzDbqI3Ht6YaYsWtrGNwX4idQQXDEwY5BUd5vAMwkGHA6rT40YfefGJXsaGlF725j xlIXGzNCFDnSGy1czTXZjQfvRUAHXjk0xv+KL8TA7LrGBRJDRQs15NPTQa2tbtklJf VEnUDFHkqF65A== From: Jeff Layton Date: Thu, 13 Jun 2024 12:44:07 -0400 Subject: [PATCH nfs-utils v5 2/4] nfsdctl: asciidoc source for the manpage Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240613-nfsdctl-v5-2-0b7a39102bac@kernel.org> References: <20240613-nfsdctl-v5-0-0b7a39102bac@kernel.org> In-Reply-To: <20240613-nfsdctl-v5-0-0b7a39102bac@kernel.org> To: Steve Dickson Cc: linux-nfs@vger.kernel.org, Lorenzo Bianconi , Chuck Lever , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Jeff Layton X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4597; i=jlayton@kernel.org; h=from:subject:message-id; bh=6qiwxDhQ8FRziLyT7fabl7gPHk/jpXioRkJvkXxPl/Q=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBmayHow/PnLp8zSOMkP4jp9LaBRgKw20wOy/Pxn uASUfa1DFuJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZmsh6AAKCRAADmhBGVaC Fb1zD/9hgWVzXxtHjVdcjTzNSjRZzkTRIj+1nH4ElQiSeOLuLCLPXaDmNtCOh/WMmPJZ6K5qcGl umpPrY+ROdAaUo49YK4aBlBTH2KaumTIp8hV2anBDiBNqmT11LI/x6N7tcCaQXqCBUAIgkuTZFV 92++Y8N49odpkwHMUg9qZ3De68EdFB/3i4tWR/SpwFM+JaGiCHYE7pi5YgAyDnKuLL/ZNISEAnt 6bCS+v2Z2Y1vowD+OKcsRzaHeAhRt1XNikPXsHPu0fbkxuMFVrxrrEw4NRv4VVG15ogHzYlPZSJ bGGz2UJ9WWcSbRn8S4k5YqtWicPyIikBwLWgcydgmsw07sGLY068GWUCsf7+ghrlmnCooLh7qa+ ARAQS3FbRKGG4Xqk/0+Ed703FABZka1pEuTxgya/qA8ECmsAaCh2X4ial0EF5wcJ/VXSW1H151d bEeJ5dtw0swD4Ea6fBsAlhyQRrR1DneA0qj7Gywt92rk1+nJjkj38yUF8Aacz7emC+jyGDlQhuN 9AA6gaedgBdpgZXKl19OcyJdwPWHEg/aHQ+i8qI0Iw3FUAMHl+8PDP2ih7kjvx23jE5EyOjJpoC Y55j0vL/1iyVOAO9WnNbKj6dcDqsZIm3/Sc4mne6OSGTRaT/9E+ssSUmYqB9ptmXPgZNCxIyJH4 uAlMa3ysJgUWhlg== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Convert to manpage with: asciidoctor -b manpage nfsdctl.adoc Signed-off-by: Jeff Layton --- utils/nfsdctl/nfsdctl.adoc | 140 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/utils/nfsdctl/nfsdctl.adoc b/utils/nfsdctl/nfsdctl.adoc new file mode 100644 index 000000000000..b2f00c11829e --- /dev/null +++ b/utils/nfsdctl/nfsdctl.adoc @@ -0,0 +1,140 @@ += nfsdctl(8) +Jeff Layton +:doctype: manpage + +== NAME + +nfsdctl - control program for the Linux kernel NFS server + +== SYNOPSIS + +*nfsdctl* [ _OPTION_ ] COMMAND ... + +== DESCRIPTION + +nfsdctl is a control and query program for the in-kernel NFS server. There are several +subcommands (documented below) that allow the admin to configure or query different +aspects of the NFS server. + +To get information about different subcommand usage, pass the subcommand the +--help parameter. For example: + + nfsdctl listener --help + +== OPTIONS + +*-d, --debug*:: + Enable debug logging + +*-h, --help*:: + Print program help text + +*-V, --version*:: + Print program version + +== SUBCOMMANDS + +Each subcommand can also accept its own set of options and arguments. The +--help option is standard for all subcommands: + +*autostart*:: + Start the server using the settings in the [nfsd] section of /etc/nfs.conf. + This subcommand takes no arguments. + +*listener*:: + + Get/set the listening sockets for the server. Run this without arguments to + get a list of the sockets on which the server is currently listening. To add + or remove sockets, pass it whitespace-separated strings in the format: + + { +|- }{ protocol }:{ address }:{ port } + + The fields are: + + + to add a listener, - to remove one + protocol: protocol name (e.g. tcp, udp, rdma) + address: hostname or address + port: port number or service name + + All fields are required, except for the address. If address is an empty string, + then the listeners will be opened for INADDR_ANY and IN6ADDR_ANY_INIT for ipv6 + (if enabled). The address can be either a hostname or an IP address. IPv4 + addresses must be in dotted-quad form. IPv6 addresses should be in standard + colon separated form, and must be enclosed in square brackets. + +*status*:: + + Get information about RPCs currently executing in the server. This subcommand + takes no arguments. + +*threads*:: + + Get/set the number of running nfsd threads in each pool. Pass a list of + integers to change the currently active number of threads. Passing it a + value of 0 will shut down the NFS server. Run this without arguments to + get the current number of running threads in each pool. + +*version*:: + + Get/set the enabled NFS versions for the server. Run without arguments to + get a list of supported versions and whether they are currently enabled or + disabled. To enable or disable a version, pass it a string in the format: + + { +|- }{ MAJOR }{.{ MINOR }} + + The fields are: + + + to enable a version, - to disable + MAJOR: the major version integer value + MINOR: the minor version integet value + + The minorversion field is optional. If not given, it will disable or enable + all minorversions for that major version. + +== EXAMPLES + +Start the server with the settings in nfs.conf: + + nfsdctl autostart + +Get a list of current listening sockets: + + nfsdctl listener + +Show the supported and enabled NFS versions: + + nfsdctl version + +Add TCP listener on all addresses (both v4 and v6), port 2049: + + nfsdctl listener +tcp::2049 + +Add RDMA listener on 1.2.3.4 port 20049: + + nfsdctl listener +rdma:1.2.3.4:20049 + +Add same listener on IPv6 address f00::ba4 port 20050: + + nfsdctl listener +rdma:[f00::ba4]:20050 + +Enable NFS version 3, disable v4.0: + + nfsdctl version +3 -4.0 + +Change the number of running threads in first pool to 256: + + nfsdctl threads 256 + +== NOTES + +nfsdctl is intended to supersede rpc.nfsd(8), which controls the nfs server +using the files under /proc/fs/nfsd. nfsdctl instead uses a netlink(7) +interface to achieve the same goals. + +Most of the commands that query the NFS server can be run as an unprivileged +user, but configuring the server typically requires an account with elevated +privileges. + +== SEE ALSO + +nfs.conf(5), rpc.nfsd(8), rpc.mountd(8), exports(5), exportfs(8), nfs.conf(5), rpc.rquotad(8), nfsstat(8), netconfig(5) -- 2.45.2