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