Commit | Line | Data |
---|---|---|
b85fd772 KB |
1 | .\" Copyright (c) 1983 The Regents of the University of California. |
2 | .\" All rights reserved. | |
e33ff789 | 3 | .\" |
b85fd772 KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
e33ff789 | 15 | .\" |
b85fd772 KB |
16 | .\" @(#)rwhod.8 6.3 (Berkeley) %G% |
17 | .\" | |
18 | .TH RWHOD 8 "" | |
e33ff789 KM |
19 | .UC 5 |
20 | .SH NAME | |
21 | rwhod \- system status server | |
22 | .SH SYNOPSIS | |
23 | .B /etc/rwhod | |
24 | .SH DESCRIPTION | |
25 | .I Rwhod | |
26 | is the server which maintains the database used by the | |
27 | .IR rwho (1C) | |
28 | and | |
29 | .IR ruptime (1C) | |
30 | programs. Its operation is predicated on the ability to | |
31 | .I broadcast | |
32 | messages on a network. | |
33 | .PP | |
34 | .I Rwhod | |
35 | operates as both a producer and consumer of status information. | |
36 | As a producer of information it periodically | |
37 | queries the state of the system and constructs | |
38 | status messages which are broadcast on a network. | |
39 | As a consumer of information, it listens for other | |
40 | .I rwhod | |
41 | servers' status messages, validating them, then recording | |
42 | them in a collection of files located in the directory | |
43 | .IR /usr/spool/rwho . | |
44 | .PP | |
38448290 MK |
45 | The server transmits and receives messages at the port indicated |
46 | in the ``rwho'' service specification; see | |
e33ff789 KM |
47 | .IR services (5). |
48 | The messages sent and received, are of the form: | |
49 | .PP | |
50 | .nf | |
51 | .ta 0.5i 1.0i 1.5i | |
52 | struct outmp { | |
53 | char out_line[8]; /* tty name */ | |
54 | char out_name[8]; /* user id */ | |
55 | long out_time; /* time on */ | |
56 | }; | |
57 | .sp | |
58 | struct whod { | |
59 | char wd_vers; | |
60 | char wd_type; | |
61 | char wd_fill[2]; | |
62 | int wd_sendtime; | |
63 | int wd_recvtime; | |
64 | char wd_hostname[32]; | |
65 | int wd_loadav[3]; | |
66 | int wd_boottime; | |
67 | struct whoent { | |
68 | struct outmp we_utmp; | |
69 | int we_idle; | |
70 | } wd_we[1024 / sizeof (struct whoent)]; | |
71 | }; | |
72 | .fi | |
73 | .PP | |
74 | All fields are converted to network byte order prior to | |
75 | transmission. The load averages are as calculated by the | |
76 | .IR w (1) | |
77 | program, and represent load averages over the 5, 10, and 15 minute | |
38448290 MK |
78 | intervals prior to a server's transmission; they are multiplied by 100 |
79 | for representation in an integer. The host name | |
e33ff789 KM |
80 | included is that returned by the |
81 | .IR gethostname (2) | |
38448290 | 82 | system call, with any trailing domain name omitted. |
e33ff789 KM |
83 | The array at the end of the message contains information about |
84 | the users logged in to the sending machine. This information | |
85 | includes the contents of the | |
86 | .IR utmp (5) | |
87 | entry for each non-idle terminal line and a value indicating the | |
38448290 | 88 | time in seconds since a character was last received on the terminal line. |
e33ff789 KM |
89 | .PP |
90 | Messages received by the | |
91 | .I rwho | |
38448290 | 92 | server are discarded unless they originated at an |
e33ff789 KM |
93 | .I rwho |
94 | server's port. In addition, if the host's name, as specified | |
95 | in the message, contains any unprintable ASCII characters, the | |
96 | message is discarded. Valid messages received by | |
97 | .I rwhod | |
98 | are placed in files named | |
99 | .IR whod . hostname | |
100 | in the directory | |
101 | .IR /usr/spool/rwho . | |
102 | These files contain only the most recent message, in the | |
103 | format described above. | |
104 | .PP | |
105 | Status messages are generated approximately once every | |
38448290 | 106 | 3 minutes. |
e33ff789 KM |
107 | .I Rwhod |
108 | performs an | |
109 | .IR nlist (3) | |
38448290 | 110 | on /vmunix every 30 minutes to guard against |
e33ff789 KM |
111 | the possibility that this file is not the system |
112 | image currently operating. | |
113 | .SH "SEE ALSO" | |
b85fd772 | 114 | rwho(1), ruptime(1) |
e33ff789 | 115 | .SH BUGS |
38448290 MK |
116 | There should be a way to relay status information between networks. |
117 | Status information should be sent only upon request rather than continuously. | |
118 | People often interpret the server dying | |
119 | or network communtication failures | |
e33ff789 | 120 | as a machine going down. |