1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" from: @(#)rwhod.8 8.2 (Berkeley) 12/11/93
29 .\" $NetBSD: rwhod.8,v 1.19 2005/09/12 16:13:13 tsarna Exp $
31 .Dd September 12, 2005
36 .Nd system status server
43 is the server which maintains the database used by the
48 Its operation is predicated on the ability to
50 messages on a network.
52 The following options are available:
53 .Bl -tag -width XXXXXXXXXXX
55 Allows for the broadcast interval to be changed from the default 3 minutes.
58 argument is the number of seconds to change the interval to, or if the
61 then it is interpreted as minutes.
62 The maximum allowed value for the broadcast interval is 11 minutes
63 because higher values will cause
65 to mark the host as being down.
67 Drop privileges and become the user
72 operates as both a producer and consumer of status information.
73 As a producer of information it periodically
74 queries the state of the system and constructs
75 status messages which are broadcast on a network.
76 As a consumer of information, it listens for other
78 servers' status messages, validating them, then recording
79 them in a collection of files located in the directory
82 The server transmits and receives messages at the port indicated
85 service specification; see
87 The messages sent and received, are of the form:
88 .Bd -literal -offset indent
90 char out_line[8]; /* tty name */
91 char out_name[8]; /* user id */
92 int32_t out_time; /* time on */
101 char wd_hostname[32];
102 int32_t wd_loadav[3];
105 struct outmp we_utmp;
107 } wd_we[1024 / sizeof (struct whoent)];
111 All fields are converted to network byte order prior to
113 The load averages are as calculated by the
115 program, and represent load averages over the 5, 10, and 15 minute
116 intervals prior to a server's transmission; they are multiplied by 100
117 for representation in an integer.
118 The host name included is that returned by the
120 function call, with any trailing domain name omitted.
121 The array at the end of the message contains information about
122 the users logged in to the sending machine.
123 This information includes the contents of the
125 entry for each non-idle terminal line and a value indicating the
126 time in seconds since a character was last received on the terminal line.
128 Messages received by the
130 server are discarded unless they originated at an
133 In addition, if the host's name, as specified
134 in the message, contains any unprintable
136 characters, the message is discarded.
137 Valid messages received by
139 are placed in files named
143 These files contain only the most recent message, in the
144 format described above.
146 Status messages are generated by default approximately once every
157 There should be a way to relay status information between networks.
158 Status information should be sent only upon request rather than continuously.
159 People often interpret the server dying or network communication
160 failures as a machine going down.