Provides the server function for the rwho and ruptime commands.
Note: Use SRC commands to control the rwhod daemon from the command line. Use the rc.tcpip file to start the daemon with each system startup.
The /usr/sbin/rwhod daemon maintains the database used by the rwho and ruptime commands. Once started, the rwhod daemon operates as both producer and consumer of status information.
As a producer of status information, the rwhod daemon queries the state of the local host approximately every 3 minutes. It then constructs status messages and broadcasts them to the local network.
As a consumer of status information, the rwhod daemon listens for status messages from rwhod servers on remote hosts. When the rwhod daemon receives a status message, it validates the received status message. It then records the message in the /var/spool/rwho directory. (The rwho and ruptime commands use the files in the /var/spool/rwho directory to generate their status listings.)
The rwhod daemon broadcasts and receives status messages using the rwho socket as specified in the /etc/services file.
When creating these messages, the rwhod daemon calculates the entries for the average CPU load for the previous 1-, 5-, and 15-minute intervals. Before broadcasting these messages, the rwhod daemon converts them to the byte order that the network can use.
When the rwhod daemon receives messages on the rwho socket, it discards any that do not originate from an rwho socket. Additionally, it discards any messages that contain unprintable ASCII characters. When the rwhod daemon receives a valid message, it places the message in a whod.HostName file in the /var/spool/rwho directory, overwriting any file with the same name.
The rwhod daemon should be controlled using the System Resource Controller (SRC). Entering rwhod at the command line is not recommended.
The rwhod daemon is a
subsystem controlled by the System Resource Controller (SRC). The rwhod daemon is a member of
the tcpip system group. This daemon is disabled by default
and can be manipulated by the following SRC commands:
|stopsrc||Stops a subsystem, group of subsystems, or a subserver.|
|traceson||Enables tracing of a subsystem, group of subsystems, or a subserver.|
|tracesoff||Disables tracing of a subsystem, group of subsystems, or a subserver.|
|lssrc||Gets the status of a subsystem, group of subsystems, or a subserver.|
startsrc -s rwhod
This command starts the daemon. You can use this command in the rc.tcpip file or on the command line. The -s flag specifies that the subsystem that follows is to be started.
stopsrc -s rwhod
This command stops the daemon. The -s flag specifies that the subsystem that follows is to be stopped.
lssrc -s rwhod
This command returns the name of the daemon, the process ID of the daemon, and the state of the daemon (active or inactive).
traceson -s rwhod
This command enables socket level debugging. Use the trpt command to look at the output of this example command.
|/etc/utmp||Contains status information on users that are logged in to the local host.|
|/var/spool/rwho/*||Contains files used by the rwho and ruptime commands to generate their status list.|
|/var/spool/rwho/whod.HostName||Contains the latest status information for the host specified by the HostName parameter.|
The ruptime command, rwho command, who command.
The gethostname subroutine.
The services file format.
TCP/IP Daemons in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.