- Display current settings when run without options.
- Revise a manpage to NOT sound confusing. [1] In collaboration with: sat [1]
This commit is contained in:
parent
e8406463e8
commit
48660452c1
@ -28,7 +28,7 @@
|
|||||||
.\" From: @(#)nfsiod.8 8.2 (Berkeley) 2/22/94
|
.\" From: @(#)nfsiod.8 8.2 (Berkeley) 2/22/94
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd September 22, 1994
|
.Dd December 26, 2009
|
||||||
.Dt NFSIOD 8
|
.Dt NFSIOD 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -42,33 +42,39 @@ asynchronous I/O server
|
|||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility is a kernel process which runs on an
|
utility controls the maximum number of
|
||||||
|
.Nm
|
||||||
|
kernel processes which run on an
|
||||||
.Tn NFS
|
.Tn NFS
|
||||||
client machine to service asynchronous I/O requests to its server.
|
client machine to service asynchronous I/O requests to its server.
|
||||||
It improves performance but is not required for correct operation.
|
Having
|
||||||
|
.Nm
|
||||||
|
kernel processes
|
||||||
|
improves performance but is not required for correct operation.
|
||||||
.Pp
|
.Pp
|
||||||
This program controls the maximum number of processes that the kernel runs.
|
The option is as follows:
|
||||||
.Pp
|
|
||||||
The options are as follows:
|
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Fl n
|
.It Fl n
|
||||||
Specify how many servers are permitted to be started.
|
Specify how many processes are permitted to be started.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
A client should run enough daemons to handle its maximum
|
Without an option,
|
||||||
|
.Nm
|
||||||
|
displays the current settings.
|
||||||
|
A client should allow enough number of processes to handle its maximum
|
||||||
level of concurrency, typically four to six.
|
level of concurrency, typically four to six.
|
||||||
.Pp
|
.Pp
|
||||||
If
|
If
|
||||||
.Nm
|
.Nm
|
||||||
detects that the running kernel does not include
|
detects that the running kernel does not include
|
||||||
.Tn NFS
|
.Tn NFS
|
||||||
support, it will attempt to load a loadable kernel module containing
|
support, it will attempt to load a kernel module containing
|
||||||
.Tn NFS
|
.Tn NFS
|
||||||
code, using
|
code, using
|
||||||
.Xr kldload 2 .
|
.Xr kldload 2 .
|
||||||
If this fails, or no
|
If this fails, or no
|
||||||
.Tn NFS
|
.Tn NFS
|
||||||
KLD was available,
|
module was available,
|
||||||
.Nm
|
.Nm
|
||||||
exits with an error.
|
exits with an error.
|
||||||
.Sh EXIT STATUS
|
.Sh EXIT STATUS
|
||||||
@ -85,3 +91,10 @@ The
|
|||||||
.Nm
|
.Nm
|
||||||
utility first appeared in
|
utility first appeared in
|
||||||
.Bx 4.4 .
|
.Bx 4.4 .
|
||||||
|
.Pp
|
||||||
|
Starting with
|
||||||
|
.Fx 5.0 ,
|
||||||
|
the utility no longer starts daemons, but only serves as a vfs
|
||||||
|
loader and
|
||||||
|
.Xr sysctl 3
|
||||||
|
wrapper.
|
||||||
|
@ -89,12 +89,12 @@ main(int argc, char *argv[])
|
|||||||
case 'n':
|
case 'n':
|
||||||
num_servers = atoi(optarg);
|
num_servers = atoi(optarg);
|
||||||
if (num_servers < 1) {
|
if (num_servers < 1) {
|
||||||
warnx("nfsiod count %d; reset to %d",
|
warnx("nfsiod count %u; reset to %d",
|
||||||
num_servers, 1);
|
num_servers, 1);
|
||||||
num_servers = 1;
|
num_servers = 1;
|
||||||
}
|
}
|
||||||
if (num_servers > MAXNFSDCNT) {
|
if (num_servers > MAXNFSDCNT) {
|
||||||
warnx("nfsiod count %d; reset to %d",
|
warnx("nfsiod count %u; reset to %d",
|
||||||
num_servers, MAXNFSDCNT);
|
num_servers, MAXNFSDCNT);
|
||||||
num_servers = MAXNFSDCNT;
|
num_servers = MAXNFSDCNT;
|
||||||
}
|
}
|
||||||
@ -109,9 +109,6 @@ main(int argc, char *argv[])
|
|||||||
if (argc > 0)
|
if (argc > 0)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
if (num_servers == 0)
|
|
||||||
exit(0); /* no change */
|
|
||||||
|
|
||||||
len = sizeof iodmin;
|
len = sizeof iodmin;
|
||||||
error = sysctlbyname("vfs.nfs.iodmin", &iodmin, &len, NULL, 0);
|
error = sysctlbyname("vfs.nfs.iodmin", &iodmin, &len, NULL, 0);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
@ -120,6 +117,11 @@ main(int argc, char *argv[])
|
|||||||
error = sysctlbyname("vfs.nfs.iodmax", &iodmax, &len, NULL, 0);
|
error = sysctlbyname("vfs.nfs.iodmax", &iodmax, &len, NULL, 0);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
err(1, "sysctlbyname(\"vfs.nfs.iodmax\")");
|
err(1, "sysctlbyname(\"vfs.nfs.iodmax\")");
|
||||||
|
if (num_servers == 0) { /* no change */
|
||||||
|
printf("vfs.nfs.iodmin=%u\nvfs.nfs.iodmax=%u\n",
|
||||||
|
iodmin, iodmax);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
/* Catch the case where we're lowering num_servers below iodmin */
|
/* Catch the case where we're lowering num_servers below iodmin */
|
||||||
if (iodmin > num_servers) {
|
if (iodmin > num_servers) {
|
||||||
iodmin = num_servers;
|
iodmin = num_servers;
|
||||||
|
Loading…
Reference in New Issue
Block a user