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