Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rwho(1)

ruptime(1)

gethostname(2)

nlist(3)

services(4)

hosts(4)

utmp(4)



  rwhod(8)                            CLIX                            rwhod(8)



  NAME

    rwhod - Runs a remote system status server

  SYNOPSIS

    /usr/ip32/tcpip/rwhod

  DESCRIPTION

    The rwhod server maintains the database used by the rwho and ruptime
    commands.  Operation of the rwhod server is predicated on the ability to
    broadcast messages on a network.

    The rwhod command may be started upon installation of the TCP/IP product
    by answering the rwhod prompt.  (The default is off.)  The tcpconfig
    utility can be used to modify the startup scripts that start rwhod.

    The rwhod command operates as both a producer and a 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
    the network.  As a consumer of information, it listens for the status
    messages of other rwhod servers, validates them, and records them in a
    collection of files located in the directory /usr/spool/rwho.

    The server transmits and receives messages at the port indicated in the
    rwho service specification (see services(4)).  The messages that are sent
    and received have the following format:

    struct outmp {
         char   out_line[8];         /* tty name */
         char   out_name[8];         /* user ID */
         long   out_time;            /* time on */
    };
    struct whod {
         char   wd_vers;             /* protocol version # */
         char   wd_type;             /* packet type */
         char   wd_pad[2];
         int    wd_sendtime;         /* time stamp by sender */
         int    wd_recvtime;         /* time stamp by receiver */
         char   wd_hostname[32];     /* host's name */
         int    wd_loadav[3];        /* load average */
         int    wd_boottime;         /* time system booted */
         struct whoent {
              struct outmp we_utmp;  /* active tty info */
              int    we_idle;        /* tty idle time */
         } wd_we[1024 / sizeof(struct whoent)];
    };

    All fields are converted to network byte order before transmission.  The
    load averages represent 5, 10, and 15-minute intervals before a server's



  2/94 - Intergraph Corporation                                              1






  rwhod(8)                            CLIX                            rwhod(8)



    transmission; they are multiplied by 100 for representation in an integer.
    The hostname included is that returned by the gethostname() function, with
    any trailing domain name omitted.  The array at the end of the message
    contains information about the users logged onto the sending machine.
    This information includes the contents of the utmp file entry for each
    nonidle terminal line and a value indicating the time in seconds since a
    character was last received on the terminal line.

    Messages received by the rwhod servers are discarded unless they
    originated at an rwhod port.  In addition, if the hostname, as specified
    in the message, contains any unprintable ASCII characters, the message is
    discarded.  Valid messages received by the rwhod servers are placed in the
    file named whod.hostname in the directory /usr/spool/rwho.  These files
    contain only the most recent messages in the format shown in the
    DESCRIPTION section.

    Status messages are generated approximately once every three minutes.  The
    rwhod command performs an nlist() function on the /unix file periodically
    to guard against the possibility that this file is not the system image
    currently operating.

  EXAMPLES

    To start the rwhod daemon, enter the following from the superuser prompt:

    /usr/ip32/tcpip/rwhod


  FILES

    /usr/spool/rwho/whod.*   Data files containing information about each
                             machine.

    /etc/init.d/tcpip        Startup script for the TCP/IP product.

  NOTES

    There should be a way to relay status information between networks.
    Status information should be sent only by request rather than
    continuously.

  DIAGNOSTICS

    The following diagnostic messages appear when using the rwhod server:

    rwhod: Not super user
           The rwhod daemon can only be run as superuser.

    rwhod: getservbyname: udp/who: Unknown Service
           The /etc/services file needs to be updated on your system.




  2                                              Intergraph Corporation - 2/94






  rwhod(8)                            CLIX                            rwhod(8)



    rwhod: gethostbyname: sam: unknown host
           The host named sam is unknown to the /etc/hosts file.

    Other diagnostic messages occur on system calls and are prepended with
    rwhod:.

  EXIT VALUES

    The rwhod command exits with a nonzero value on fatal error.

  RELATED INFORMATION

    Commands:  rwho(1), ruptime(1)

    Functions:  gethostname(2), nlist(3)

    Files:  services(4), hosts(4), utmp(4)





































  2/94 - Intergraph Corporation                                              3




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