Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rwhod(1M) — GL2 W2.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rwho(1C)

ruptime(1C)

RWHOD(1M)  —  Silicon Graphics

NAME

rwhod − system status server

SYNOPSIS

/etc/net/rwhod [ kernel_name ]

DESCRIPTION

rwhod is the server that 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. 

rwhod operates as both a producer and consumer of status information.  As a producer of information, it periodically queries the state of the system and constructs status messages that are broadcast on a network.  As a consumer of information, it listens for the status messages of other rwhod servers, validating them and then recording them in a collection of files located in the directory /usr/spool/rwho. 

The rwho server transmits and receives messages at the port IPPORT_WHOSERVER, which has the value 513.  The messages sent and received are of the following form:

structoutmp {
charout_line[8];/* tty name */
charout_name[8];/* user id */
longout_time;/* time on */
};
structwhod {
charwd_vers;
charwd_type;
charwd_fill[2];
intwd_sendtime;
intwd_recvtime;
charwd_hostname[32];
intwd_loadav[3];
intwd_boottime;
structwhoent {
structoutmp we_utmp;
intwe_idle;
} wd_we[1024 / sizeof (struct whoent)];
};

All fields are converted to network byte order prior to transmission.  If load averages are available, they represent the average number of processes in the run queue over the past 5, 10, and 15 minutes.  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 the contents of the utmp(4) entry for each nonidle 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 a 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. 

Status messages are generated approximately once every 60 seconds.  Systemwide statistics are refreshed periodically.  Every 10 minutes rwhod performs an nlist(3) on kernel_name (/vmunix by default) and inspects various global variables in /dev/kmem.  The repeated use of nlist guards against the possibility that this file is not the system image currently operating. 

FILES

/vmunix- kernel namelist

SEE ALSO

rwho(1C), ruptime(1C)

BUGS

Should relay status information between networks.  People often interpret the server’s dying as a machine going down.  Load averages are not available on all systems, in which case the values supplied are zero. 

Version 2.4  —  May 08, 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026