[comp.unix.wizards] Non broadcasting rwhod

vp@cui.UUCP (PREVELAKIS Vassilis) (02/15/89)

In article <3674@phri.UUCP> roy@phri.UUCP writes:
>(*) Just why was I hacking on rwhod you ask?  As documented by Sun, rwho is a
>real performance pig. [...]

You came 3rd :-)  About three years ago, I changed rwhod so that all the useless
broadcasting could be eliminated.  When I came here (to Geneva) I found out
that another guy here had also performed (more or less) the same mods on
rwhod.

The way I did it, was as follows:
	If rwhod realizes thats its running on a client machine it simply
	sends its load info to the machine designated as server.

	The rwhod running on the server simply collects the load info
	from the clients and updates files in the /usr/spool/rwho
	directory (it also saves there its own load info).

	The client machines NFS mount the server's /usr/spool/rwho
	directory so that programs like ruptime work without mods.

	How does rhod know who is the server?  The easy way is to
	supply it as an argument (e.g. /usr/etc/rwhod <servername>).
	(or for that matter have /usr/etc/rwhod linked to
	/usr/spool/servername and have rwhod check its own name)
	Anyway, this gives one version of the rwhod program without
	causing too much hassle in case you want to designate
	a new rwhod server.

Probs:
	I also got bitten by the special version of sendto.  For some
	(unknown) reason I assumed that the debugging version printed
	the diagnostics but SENT THE MESSAGE AS WELL.  Needless to say
	that I was very annoyed when I realized that I was looking
	for bugs that weren't there.

	The other problem occurs when the clocks of the various machines
	are out of sync.  In that case the server may get times in the
	future and assume that the machines are down.  Someone told me
	that this is no longer a problem, but I am still skeptical.

BTW some guy was asking about broadcasts over the Ethernet.  I think that
the rwhod code is good example.	 I also think that the rwhod code is in the
stuff that can be ftp'd from UCB free of charge.
	
/vp

forys@snake.utah.edu (Jeff Forys) (02/18/89)

In article <340@cui.UUCP> vp@cui.UUCP (PREVELAKIS Vassilis) writes:
> You came 3rd :-)  About three years ago, I changed rwhod so that all
> the useless broadcasting could be eliminated.  When I came here (to
> Geneva) I found out that another guy here had also performed (more or
> less) the same mods on rwhod.

After several people mentioned their enhancements to rwhod, I am
reminded of work I did on rwhod whilst at Boulder.  I believe it
incorporates all that the other enhancers mentioned, and then
some.  Of course, I dont claim that every machine should run this
particular version, but it does have some extremely useful features
making it ideal on gateways and such.

The remainder of this article consists of an announcement I sent
to a small mailing list almost a year ago.  The information it
contains is still up-to-date; I havent done anything with the code
since, and it's been in operation at Boulder for quite some time.
It even comes with diffs to the 4.3BSD man page -- have you fallen
off your chair yet?  If not, read on...  :-)

Jeff

-------------------------------------------------------------------------
From: Jeff Forys <forys@boulder.Colorado.EDU>
Subject: configurable rwhod, anyone?
Date: Sun, 24 Apr 88 02:50:27 MST

Various members of our fine user community complained that
rwho/ruptime did not provide ample information (i.e. many
machines were not being reported).  As distributed, rwhod
does not forward packets across gateways, and there is no
way to unicast packets across networks where you have no
control.  Unfortunately, IP Multicasting is not a viable
alternative (yet).

So, I have produced a configurable rwhod server which, among
other things, forwards packets across gateways and allows
one to set up point-to-point unicast links to other machines.
The config file lets you do the following:

	1) set how often your machine announces itself.
	2) change the spool directory.
	3) forward select packets across a gateway using
	   a global host timer (i.e. you can set the timer
	   to only forward 1 packet/host every N seconds).
	4) filter incoming packets on a per host and per
	   network basis.
	5) set up point-to-point rwho links with any host
	   on the internet.  These links are then treated
	   identical to as any other interface whenever
	   filtering/forwarding packets.

It comes diff'd against 4.3BSD (source/man page) and is #if'd
for BSD, SUN, UMAX, PYRAMID, and ULTRIX.  If you have need for
such a beast, you are welcome to it.  The diff's are ftp'able
from boulder.Colorado.EDU (128.138.240.1) in the directory
"pub/rwhod.diffs".  It's stable-BETA, but there's still more
work to be done (e.g. profiling, cleaning up the code, etc).
If you snag this and start using it, I'd appreciate hearing of
any bugs or enhancements to the code.
---
Jeff Forys @ Unv of Utah/Salt Lake, Comp Sci Dept. (801-581-4280)
forys@cs.utah.edu  -or-  ..!{boulder,decvax,nbires}!utah-cs!forys