From: Jeff Layton <jlayton@kernel.org>
To: Steve Dickson <steved@redhat.com>
Cc: linux-nfs@vger.kernel.org, Neil Brown <neilb@suse.de>,
Olga Kornievskaia <kolga@netapp.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Chuck Lever <chuck.lever@oracle.com>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Jeff Layton <jlayton@kernel.org>
Subject: [PATCH nfs-utils v6 2/3] nfsdctl: asciidoc source for the manpage
Date: Mon, 22 Jul 2024 13:01:34 -0400 [thread overview]
Message-ID: <20240722-nfsdctl-v6-2-1b9d63710eb5@kernel.org> (raw)
In-Reply-To: <20240722-nfsdctl-v6-0-1b9d63710eb5@kernel.org>
Convert to manpage with:
asciidoctor -b manpage nfsdctl.adoc
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
utils/nfsdctl/nfsdctl.adoc | 158 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 158 insertions(+)
diff --git a/utils/nfsdctl/nfsdctl.adoc b/utils/nfsdctl/nfsdctl.adoc
new file mode 100644
index 000000000000..7119b44db6d2
--- /dev/null
+++ b/utils/nfsdctl/nfsdctl.adoc
@@ -0,0 +1,158 @@
+// Convert to manpage via: asciidoctor -b manpage nfsdctl.adoc
+= 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. Note that if a "threads=" value is not set in
+ nfs.conf, 16 server threads will be brought online.
+
+*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.
+
+*pool-mode*::
+
+ Get/set the host's pool mode. This will cause the server to start threads
+ that are pinned to either the CPU or the NUMA node. This can only be set
+ when there are no nfsd threads running.
+
+ The available options are:
+ global: single large pool
+ percpu: pool per CPU
+ pernode: pool per NUMA node
+ auto: choose a mode based on host configuration
+
+== 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
+
+Set the pool-mode to "pernode":
+
+ nfsctl pool-mode pernode
+
+== 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
next prev parent reply other threads:[~2024-07-22 17:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-22 17:01 [PATCH nfs-utils v6 0/3] nfsdctl: add a new nfsdctl tool to nfs-utils Jeff Layton
2024-07-22 17:01 ` [PATCH nfs-utils v6 1/3] nfsdctl: add the nfsdctl utility " Jeff Layton
2024-07-22 17:01 ` Jeff Layton [this message]
2024-07-22 17:01 ` [PATCH nfs-utils v6 3/3] systemd: use nfsdctl to start and stop the nfs server Jeff Layton
2024-07-26 19:40 ` [PATCH nfs-utils v6 0/3] nfsdctl: add a new nfsdctl tool to nfs-utils Steve Dickson
2024-07-26 21:32 ` Jeff Layton
2024-07-26 21:59 ` Steve Dickson
2024-07-26 22:20 ` Jeff Layton
2024-07-27 11:28 ` Steve Dickson
2024-07-27 16:03 ` Chuck Lever III
2024-09-30 15:52 ` Jeff Layton
2024-09-30 16:16 ` Steve Dickson
2024-10-16 15:02 ` Jeff Layton
2024-10-16 20:10 ` Steve Dickson
2024-10-17 11:40 ` Steve Dickson
2024-10-17 15:22 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240722-nfsdctl-v6-2-1b9d63710eb5@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=kolga@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=neilb@suse.de \
--cc=steved@redhat.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox