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