xref: /freebsd/usr.sbin/rpc.lockd/rpc.lockd.8 (revision 6bfca4dcab07dad45a805879d954876b353c0810)
1.\"	$NetBSD: rpc.lockd.8,v 1.5 2000/06/09 18:51:47 cgd Exp $
2.\"
3.\" Copyright (c) 1995 A.R.Gordon, andrew.gordon@net-tel.co.uk
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.Dd November 21, 2019
31.Dt RPC.LOCKD 8
32.Os
33.Sh NAME
34.Nm rpc.lockd
35.Nd NFS file locking daemon
36.Sh SYNOPSIS
37.Nm
38.Op Fl d Ar debug_level
39.Op Fl F
40.Op Fl g Ar grace period
41.Op Fl h Ar bindip
42.Op Fl p Ar port
43.Sh DESCRIPTION
44The
45.Nm
46utility provides monitored and unmonitored file and record locking services
47in an NFS environment.
48To monitor the status of hosts requesting locks,
49the locking daemon typically operates in conjunction
50with
51.Xr rpc.statd 8 .
52.Pp
53Options and operands available for
54.Nm :
55.Bl -tag -width indent
56.It Fl d
57The
58.Fl d
59option causes debugging information to be written to syslog, recording
60all RPC transactions to the daemon.
61These messages are logged with level
62.Dv LOG_DEBUG
63and facility
64.Dv LOG_DAEMON .
65Specifying a
66.Ar debug_level
67of 1 results
68in the generation of one log line per protocol operation.
69Higher
70debug levels can be specified, causing display of operation arguments
71and internal operations of the daemon.
72.It Fl F
73Run
74.Nm
75in the foreground, rather than going into daemon mode.
76This is useful if some other process uses
77.Xr fork 2
78and
79.Xr exec 3
80to run
81.Nm ,
82and wants to monitor when and how it exits.
83.It Fl g
84The
85.Fl g
86option allow to specify the
87.Ar grace period ,
88in seconds.
89During the grace period
90.Nm
91only accepts requests from hosts which are reinitialising locks which
92existed before the server restart.
93Default is 30 seconds.
94.It Fl h Ar bindip
95Specify specific IP addresses to bind to.
96This option may be specified multiple times.
97If no
98.Fl h
99option is specified,
100.Nm
101will bind to
102.Dv INADDR_ANY .
103Note that when specifying IP addresses with
104.Fl h ,
105.Nm
106will automatically add
107.Li 127.0.0.1
108and if IPv6 is enabled,
109.Li ::1
110to the list.
111.It Fl p
112The
113.Fl p
114option allow to force the daemon to bind to the specified
115.Ar port ,
116for both AF_INET and AF_INET6 address families.
117.El
118.Pp
119Error conditions are logged to syslog, irrespective of the debug level,
120using log level
121.Dv LOG_ERR
122and facility
123.Dv LOG_DAEMON .
124.Pp
125The
126.Nm
127utility must NOT be invoked by
128.Xr inetd 8
129because the protocol assumes that the daemon will run from system start time.
130Instead, it should be configured in
131.Xr rc.conf 5
132to run at system startup.
133.Sh FILES
134.Bl -tag -width /usr/include/rpcsvc/nlm_prot.x -compact
135.It Pa /usr/include/rpcsvc/nlm_prot.x
136RPC protocol specification for the network lock manager protocol.
137.El
138.Sh SEE ALSO
139.Xr syslog 3 ,
140.Xr rc.conf 5 ,
141.Xr rpc.statd 8
142.Sh STANDARDS
143The implementation is based on the specification in
144.Rs
145.%B "X/Open CAE Specification C218"
146.%T "Protocols for X/Open PC Interworking: XNFS, Issue 4"
147.%O ISBN 1 872630 66 9
148.Re
149.Sh HISTORY
150A version of
151.Nm
152appeared in
153.Tn SunOS
1544.
155.Sh BUGS
156The current implementation serialises locks requests that could be shared.
157