1RWHOD(8) BSD System Manager's Manual RWHOD(8)
2
4 rwhod — system status server
5
7 rwhod [-bpa] [-u user]
8
10 Rwhod is the server which maintains the database used by the rwho(1) and
11 ruptime(1) programs. Its operation is predicated on the ability to
12 broadcast messages on a network.
13
14 Rwhod operates as both a producer and consumer of status information. As
15 a producer of information it periodically queries the state of the system
16 and constructs status messages which are broadcast on a network. As a
17 consumer of information, it listens for other rwhod servers' status mes‐
18 sages, validating them, then recording them in a collection of files
19 located in the directory /var/spool/rwho.
20
21 The server transmits and receives messages at the port indicated in the
22 ``rwho'' service specification; see services(5).
23
24 If the -b flag is supplied, only broadcast interfaces, such as ethernets,
25 will be used. If the -p flag is supplied, only point-to-point interfaces
26 will be used. If the -a flag is supplied, or no flags are supplied, all
27 interfaces will be used.
28
29 If the -u flag is supplied, rwhod will run as the specified user instead
30 of as root.
31
32 The messages sent and received, are of the form:
33
34 struct outmp {
35 char out_line[8]; /* tty name */
36 char out_name[8]; /* user id */
37 long out_time; /* time on */
38 };
39
40 struct whod {
41 char wd_vers;
42 char wd_type;
43 char wd_fill[2];
44 int wd_sendtime;
45 int wd_recvtime;
46 char wd_hostname[32];
47 int wd_loadav[3];
48 int wd_boottime;
49 struct whoent {
50 struct outmp we_utmp;
51 int we_idle;
52 } wd_we[1024 / sizeof (struct whoent)];
53 };
54
55 All fields are converted to network byte order prior to transmission.
56 The load averages are as calculated by the w(1) program, and represent
57 load averages over the 5, 10, and 15 minute intervals prior to a server's
58 transmission; they are multiplied by 100 for representation in an inte‐
59 ger. The host name included is that returned by the gethostname(2) sys‐
60 tem call, with any trailing domain name omitted. The array at the end of
61 the message contains information about the users logged in to the sending
62 machine. This information includes the contents of the utmp(5) entry for
63 each non-idle terminal line and a value indicating the time in seconds
64 since a character was last received on the terminal line.
65
66 Messages received by the rwho server are discarded unless they originated
67 at an rwho server's port. In addition, if the host's name, as specified
68 in the message, contains any unprintable ASCII characters, the message is
69 discarded. Valid messages received by rwhod are placed in files named
70 whod.hostname in the directory /var/spool/rwho. These files contain only
71 the most recent message, in the format described above.
72
73 Status messages are generated approximately once every 3 minutes. Rwhod
74 recomputes the system boot time every 30 minutes because on some (non-
75 Linux) systems it is not a totally reliable process.
76
78 rwho(1), ruptime(1)
79
81 There should be a way to relay status information between networks. Peo‐
82 ple often interpret the server dying or network communtication failures
83 as a machine going down.
84
86 The rwhod command appeared in 4.2BSD.
87
88Linux NetKit (0.17) May 13, 1997 Linux NetKit (0.17)