1 '\" te
   2 .\"  Copyright 1989 AT&T
   3 .\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH IN.RWHOD 1M "Dec 8, 2001"
   8 .SH NAME
   9 in.rwhod, rwhod \- system status server
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fB/usr/sbin/in.rwhod\fR [\fB-m\fR [\fIttl\fR]]
  14 .fi
  15 
  16 .SH DESCRIPTION
  17 .sp
  18 .LP
  19 \fBin.rwhod\fR is the server which maintains the database used by the
  20 \fBrwho\fR(1) and \fBruptime\fR(1) programs.  Its operation is predicated on
  21 the ability to broadcast or multicast messages on a network.
  22 .sp
  23 .LP
  24 \fBin.rwhod\fR operates as both a producer and consumer of status information.
  25 As a producer of information it periodically queries the state of the system
  26 and constructs status messages which are broadcast or multicast on a network.
  27 As a consumer of information, it listens for other \fBin.rwhod\fR servers'
  28 status messages, validating them, then recording them in a collection of files
  29 located in the directory \fB/var/spool/rwho\fR.
  30 .sp
  31 .LP
  32 The \fBrwho\fR server transmits and receives messages at the port indicated in
  33 the \fBrwho\fR service specification, see \fBservices\fR(4). The messages sent
  34 and received are defined in \fB/usr/include/protocols/rwhod.h\fR and are of the
  35 form:
  36 .sp
  37 .in +2
  38 .nf
  39 struct  outmp {
  40         char     out_line[8];   /* tty name */
  41         char     out_name[8];   /* user id */
  42         long     out_time;      /* time on */
  43 };
  44 struct  whod {
  45         char     wd_vers;
  46         char     wd_type;
  47         char     wd_fill[2];
  48         int      wd_sendtime;
  49         int      wd_recvtime;
  50         char     wd_hostname[32];
  51         int      wd_loadav[3];
  52         int      wd_boottime;
  53         struct   whoent {
  54                  struct   outmp we_utmp;
  55                  int      we_idle;
  56      } wd_we[1024 / sizeof (struct whoent)];
  57  };
  58 .fi
  59 .in -2
  60 .sp
  61 
  62 .sp
  63 .LP
  64 All fields are converted to network byte order prior to transmission.  The load
  65 averages are as calculated by the \fBw\fR(1) program, and represent load
  66 averages over the 1, 5, and 15 minute intervals prior to a server's
  67 transmission.  The host name included is that returned by the \fBuname\fR(2)
  68 system call. The array at the end of the message contains information about the
  69 users who are logged in to the sending machine.  This information includes the
  70 contents of the \fButmpx\fR(4) entry for each non-idle terminal line and a
  71 value indicating the time since a character was last received on the terminal
  72 line.
  73 .sp
  74 .LP
  75 Messages received by the \fBrwho\fR server are discarded unless they originated
  76 at a \fBrwho\fR server's port.  In addition, if the host's name, as specified
  77 in the message, contains any unprintable \fBASCII\fR characters, the message is
  78 discarded. Valid messages received by \fBin.rwhod\fR are placed in files named
  79 \fBwhod.\fR\fBhostname\fR in the directory \fB/var/spool/rwho\fR. These files
  80 contain only the most recent message, in the format described above.
  81 .sp
  82 .LP
  83 Status messages are generated approximately once every 3 minutes.
  84 .SH OPTIONS
  85 .sp
  86 .LP
  87 The following options are supported:
  88 .sp
  89 .ne 2
  90 .na
  91 \fB\fB\fR\fB-m\fR\fB \fR[\fI ttl \fR]\fR
  92 .ad
  93 .RS 14n
  94 Use the rwho  \fBIP\fR multicast address (224.0.1.3) when transmitting. Receive
  95 announcements both on this multicast address and on the  \fBIP\fR broadcast
  96 address. If  \fIttl\fR is not specified  \fBin.rwhod\fR multicasts on all
  97 interfaces but with the  \fBIP\fR TimeToLive set to 1 (that is, packets are not
  98 forwarded by multicast routers.) If  \fIttl\fR is specified  \fBin.rwhod\fR
  99 only transmits packets on one interface and setting the  \fBIP\fR TimeToLive to
 100 the specified  \fIttl\fR.
 101 .RE
 102 
 103 .SH FILES
 104 .sp
 105 .ne 2
 106 .na
 107 \fB\fB/var/spool/rwho/whod.*\fR\fR
 108 .ad
 109 .RS 26n
 110 information about other machines
 111 .RE
 112 
 113 .SH SEE ALSO
 114 .sp
 115 .LP
 116 \fBruptime\fR(1), \fBrwho\fR(1), \fBw\fR(1), \fBuname\fR(2), \fBservices\fR(4),
 117 \fButmpx\fR(4), \fBattributes\fR(5)
 118 .SH WARNINGS
 119 .sp
 120 .LP
 121 This service can cause network performance problems when used by several hosts
 122 on the network. It is not run at most sites by default. If used, include the
 123 \fB-m\fR multicast option.
 124 .SH NOTES
 125 .sp
 126 .LP
 127 This service takes up progressively more network bandwidth as the number of
 128 hosts on the local net increases.  For large networks, the cost becomes
 129 prohibitive.
 130 .sp
 131 .LP
 132 \fBin.rwhod\fR should relay status information between networks. People often
 133 interpret the server dying as a machine going down.