rwhod++ - a new rwho daemon

SYNOPSIS

rwhod++ [ -d ] [ -t seconds ] [ -r num ] [ -a num ] netgroup | filename ...

DESCRIPTION

rwhod++ is a compatible replacement for the classic rwhod program. In contrast to rwhod, which is based on broadcasting, rwhod++ polls a list of hosts via RPC and therefore consumes significantly less network bandwidth. As rwhod++ actively contacts the specified hosts, the hosts are not limited to the local network. The client programs (rwhod and ruptime) need not be replaced when the new daemon is used, because the spool files generated by rwhod++ are identical to those written by the standard rwhod.

rwhod++ is usually run on a single host in the local network. The spool directory /usr/spool/rwho on this host can then be exported via NFS to any number of machines. However, to avoid byte-order problems and to reduce NFS traffic, it may be a good idea to periodically cache the rwho-output and ruptime-output on the system running rwhod++, and then on all client machines replace rwho and ruptime by trivial shell scripts that just cat(1) the cache files.

On startup, rwhod++ reads its arguments to build a list of hosts to contact. Each argument is either the name of a NIS netgroup or a filename. Arguments that begin with a slash character (`/') are considered filenames; each file holds one hostname per line (filenames must be absolute pathnames so that the files can be reopened once rwhod++ has changed the current directory to /usr/spool/rwho). The final list of hosts is then randomized to eliminate effects caused by netgroups with their host entries sorted by subnets.

rwhod++ cycles through the list of hosts built on startup, sending one rstat and one rusers RPC request to each host during each round. In the first pass, the hostnames are resolved and the portmapper on each host is contacted to obtain the port numbers for the RPC calls. rwhod++ collects the RPC replies asynchronously to avoid blocking on hosts that are not responding.

If no positive reply is received from a host after a certain number of requests, the host is reset. This causes the hostname to be resolved again and the remote portmapper to be (re-)contacted during the next round to take care of hosts that were rebooted or whose IP addresses have changed since rwhod++ was started.

OPTIONS

-t seconds
This option specifies the time for one cycle through the list of hosts contacted by rwhod++. The default is the number of hosts in seconds.
-r num
num specifies the number of unanswered requests after which the unresponsive host is reset. A separate count is maintained for each type of RPC request sent to each host. The default value for this option is chosen such that a host is reset 15 minutes after the last successful transaction.
-a num
rwhod++ periodically re-reads its arguments (netgroups and/or files) to check if any hosts have been added or removed and, if so, updates its list of hosts. The option -a is used to specify that the arguments should be re-read each num cycles through the list of hosts. The default is chosen such that the arguments are re-read once every half hour. rwhod++ also re-reads its arguments on receipt of a HUP signal.
-d
Debug mode. Normally, rwhod++ backgrounds itself on startup and uses syslog to record error and warning messages. In debug mode, rwhod++ stays in the foreground and writes messages to standard error output.

EXAMPLES

rwhod++ -t 180 rwhohosts /usr/spool/rwho/etc/extra-hosts

This command line causes rwhod++ to read hostnames from the netgroup rwhohosts and, in addition, from the specified file. Each cycle through the list of hosts will take exactly three minutes.

FILES

/usr/spool/rwho/whod.*

SEE ALSO

ruptime(1), rwho(1)

AUTHOR

Oliver Laumann, net@informatik.uni-bremen.de


Markup created by unroff 1.0,    May 14, 1996.