xref: /freebsd/usr.sbin/rpc.statd/rpc.statd.8 (revision a7623790fb345e6dc986dfd31df0ace115e6f2e4)
1.\" -*- nroff -*-
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.\" $FreeBSD$
31.\"
32.Dd November 21, 2019
33.Dt RPC.STATD 8
34.Os
35.Sh NAME
36.Nm rpc.statd
37.Nd host status monitoring daemon
38.Sh SYNOPSIS
39.Nm
40.Op Fl d
41.Op Fl F
42.Op Fl h Ar bindip
43.Op Fl p Ar port
44.Sh DESCRIPTION
45The
46.Nm
47utility
48is a daemon which co-operates with
49.Nm
50daemons on other hosts to provide
51a status monitoring service.
52The daemon accepts requests from
53programs running on the local host (typically,
54.Xr rpc.lockd 8 ,
55the NFS file locking daemon) to monitor the status of specified
56hosts.
57If a monitored host crashes and restarts, the remote daemon will
58notify the local daemon, which in turn will notify the local program(s)
59which requested the monitoring service.
60Conversely, if this host crashes
61and re-starts, when the
62.Nm
63re-starts, it will notify all of the hosts which were being monitored
64at the time of the crash.
65.Pp
66The following option is available:
67.Bl -tag -width indent
68.It Fl d
69Cause debugging information to be written to syslog, recording
70all RPC transactions to the daemon.
71These messages are logged with level
72LOG_DEBUG and facility LOG_DAEMON.
73Error conditions are logged irrespective
74of this option, using level LOG_ERR.
75.It Fl F
76Run
77.Nm
78in the foreground, rather than going into daemon mode.
79This is useful if some other process uses
80.Xr fork 2
81and
82.Xr exec 3
83to run
84.Nm ,
85and wants to monitor when and how it exits.
86.It Fl h Ar bindip
87Specify specific IP addresses to bind to.
88This option may be specified multiple times.
89If no
90.Fl h
91option is specified,
92.Nm
93will bind to
94.Dv INADDR_ANY .
95Note that when specifying IP addresses with
96.Fl h ,
97.Nm
98will automatically add
99.Li 127.0.0.1
100and if IPv6 is enabled,
101.Li ::1
102to the list.
103.It Fl p
104The
105.Fl p
106option allow to force the daemon to bind to the specified
107.Ar port ,
108for both AF_INET and AF_INET6 address families.
109.El
110.Pp
111The
112.Nm
113utility must NOT be invoked by
114.Xr inetd 8
115because the protocol assumes that the daemon will run from system start time.
116Instead, it should be run from
117.Xr rc 8
118after the network has been started.
119.Sh FILES
120.Bl -tag -width /usr/include/rpcsvc/sm_inter.x -compact
121.It Pa /var/db/statd.status
122non-volatile record of currently monitored hosts.
123.It Pa /usr/include/rpcsvc/sm_inter.x
124RPC protocol specification used by local applications to register monitoring requests.
125.El
126.Sh SEE ALSO
127.Xr syslog 3 ,
128.Xr rc 8 ,
129.Xr rpc.lockd 8
130.Sh STANDARDS
131The implementation is based on the specification in X/Open CAE Specification
132C218, "Protocols for X/Open PC Interworking: XNFS, Issue 4", ISBN 1 872630 66 9
133.Sh BUGS
134There is no means for the daemon to tell when a monitored host has
135disappeared permanently (e.g.\& catastrophic hardware failure), as opposed
136to transient failure of the host or an intermediate router.
137At present,
138it will re-try notification attempts at frequent intervals for 10 minutes,
139then hourly, and finally gives up after 24 hours.
140.Pp
141The protocol requires that symmetric monitor requests are made to both
142the local and remote daemon in order to establish a monitored relationship.
143This is convenient for the NFS locking protocol, but probably reduces the
144usefulness of the monitoring system for other applications.
145.Pp
146The current implementation uses more than 1Kbyte per monitored host in
147the status file (and also in VM).
148This may be inefficient for NFS servers
149with large numbers of clients.
150