RWHOD(8C) BSD RWHOD(8C)
NAME
rwhod - system status server
SYNOPSIS
/etc/rwhod [ -w ]
DESCRIPTION
The rwhod server maintains the database used by the rwho(1C) and
ruptime(1C) programs. Its operation is predicated on the ability to
broadcast messages on a network.
On Apollo networks, rwhod has been changed to take advantage of the
Domain distributed file system and to reduce contention for the rwho
directory. Since on Apollo networks, there is no need for every host on
the network to maintain its own /usr/spool/rwho directory, a change has
been made to allow you to specify one host per network who will write the
information to a master /usr/spool/rwho directory. All the other hosts
link to that master directory to access the information but do not write
to the directory. Specifically, rwhod writes to /usr/spool/rwho only if
that directory is local to the node, or if the optional -w switch is
supplied.
rwhod both produces and consumes system status information. It
periodically queries the state of the system and constructs status
messages which are broadcast on a network, and it listens for other rwhod
servers' status messages as well. When it receives a status message from
another server, rwhod validates it and records it in a file located in
the directory /usr/spool/rwho, if the directory is physically located on
the host or if rwhod was started with the -w switch. On hosts where
rwhod was started without the -w switch and where /usr/spool/rwho is a
link to a remote host, rwhod does not write to the directory.
The rwho server transmits and receives messages at the port indicated in
the "rwho" service specification. The messages sent and received, are of
the form:
struct outmp {
char out_line[8];/* tty name */
char out_name[8];/* user id */
long out_time;/* time on */
};
struct whod {
char wd_vers;
char wd_type;
char wd_fill[2];
int wd_sendtime;
int wd_recvtime;
char wd_hostname[32];
int wd_loadav[3];
int wd_boottime;
struct whoent {
structoutmp we_utmp;
int we_idle;
} wd_we[1024 / sizeof (struct whoent)];
};
All fields are converted to network byte order before transmission. The
load averages represent averages over the 5, 10, and 15 minute intervals
prior to a server's transmission. The host name included is that
returned by the gethostname(2) system call. The array at the end of the
message contains information about the users logged in to the sending
machine. This information includes an entry for each non-idle terminal
line and a value indicating the time since a character was last received
on the terminal line.
Messages received by the rwho server are discarded unless they originated
at an rwho server's port. In addition, if the host's name, as specified
in the message, contains any unprintable ASCII characters, the message is
discarded. Valid messages received by rwhod are placed in files named
whod.hostname in the directory /usr/spool/rwho. These files contain only
the most recent message, in the format described above.
OPTIONS
-w Update the files in the /usr/spool/rwho directory, even if the
directory is not local to the node.
NOTES
Note that rwhod will update the files in the /usr/spool/rwho directory in
two cases:
1. If the /usr/spool/rwho directory is physically located
on that host.
2. If rwhod was started with the -w switch.
To reduce contention for the rwho directory and provide updated
information to hosts, we recommend that you
⊕ Physically locate the /usr/spool/rwho directory on the network's
TCP/IP administrative node. All other hosts on the network should be
set up so that /usr/spool/rwho is a link to the administrative node.
⊕ If you are running rwhod in a Domain internet, you can configure your
network in one of two ways:
1. Configure one node on each subnet to have a local /usr/spool/rwho
and link all other nodes on that subnet to that node.
2. Configure all nodes in the internet to link to one master TCP/IP
administrative node containing the /usr/spool/rwho directory.
This enables the rwho and ruptime utilities to see all nodes in the
internet.
In order to make this arrangement work, you must run rwhod -w on one
node on each subnet. They will then write their subnet's information
to the directory on the internet's master TCP/IP administrative node.
You also can run rwhod on a gateway to see broadcasts from two
networks.
rwhod, like other BSD daemons, is invoked at boot time by the
/etc/rc.local startup file. See Configuring and Managing TCP/IP for more
information about rwhod.
NOTES
People often interpret the server's dying as a machine in the network
going down.
SEE ALSO
rwho(1C), ruptime(1C), rc(8)