BSD 4_2 development
[unix-history] / usr / man / man8 / rwhod.8c
CommitLineData
0d5912d8
C
1.TH RWHOD 8C "4 March 1983"
2.UC 4
3.SH NAME
4rwhod \- system status server
5.SH SYNOPSIS
6.B /etc/rwhod
7.SH DESCRIPTION
8.I Rwhod
9is the server which maintains the database used by the
10.IR rwho (1C)
11and
12.IR ruptime (1C)
13programs. Its operation is predicated on the ability to
14.I broadcast
15messages on a network.
16.PP
17.I Rwhod
18operates as both a producer and consumer of status information.
19As a producer of information it periodically
20queries the state of the system and constructs
21status messages which are broadcast on a network.
22As a consumer of information, it listens for other
23.I rwhod
24servers' status messages, validating them, then recording
25them in a collection of files located in the directory
26.IR /usr/spool/rwho .
27.PP
28The
29.I rwho
30server transmits and receives messages at the port indicated
31in the ``rwho'' service specification, see
32.IR services (5).
33The messages sent and received, are of the form:
34.PP
35.nf
36.ta 0.5i 1.0i 1.5i
37struct outmp {
38 char out_line[8]; /* tty name */
39 char out_name[8]; /* user id */
40 long out_time; /* time on */
41};
42.sp
43struct whod {
44 char wd_vers;
45 char wd_type;
46 char wd_fill[2];
47 int wd_sendtime;
48 int wd_recvtime;
49 char wd_hostname[32];
50 int wd_loadav[3];
51 int wd_boottime;
52 struct whoent {
53 struct outmp we_utmp;
54 int we_idle;
55 } wd_we[1024 / sizeof (struct whoent)];
56};
57.fi
58.PP
59All fields are converted to network byte order prior to
60transmission. The load averages are as calculated by the
61.IR w (1)
62program, and represent load averages over the 5, 10, and 15 minute
63intervals prior to a server's transmission. The host name
64included is that returned by the
65.IR gethostname (2)
66system call.
67The array at the end of the message contains information about
68the users logged in to the sending machine. This information
69includes the contents of the
70.IR utmp (5)
71entry for each non-idle terminal line and a value indicating the
72time since a character was last received on the terminal line.
73.PP
74Messages received by the
75.I rwho
76server are discarded unless they originated at a
77.I rwho
78server's port. In addition, if the host's name, as specified
79in the message, contains any unprintable ASCII characters, the
80message is discarded. Valid messages received by
81.I rwhod
82are placed in files named
83.IR whod . hostname
84in the directory
85.IR /usr/spool/rwho .
86These files contain only the most recent message, in the
87format described above.
88.PP
89Status messages are generated approximately once every
9060 seconds.
91.I Rwhod
92performs an
93.IR nlist (3)
94on /vmunix every 10 minutes to guard against
95the possibility that this file is not the system
96image currently operating.
97.SH "SEE ALSO"
98rwho(1C),
99ruptime(1C)
100.SH BUGS
101Should relay status information between networks.
102People often interpret the server dieing
103as a machine going down.