Path: utzoo!attcan!uunet!mcvax!cernvax!cui!vp From: vp@cui.UUCP (PREVELAKIS Vassilis) Newsgroups: comp.unix.wizards Subject: Re: Non broadcasting rwhod Keywords: rwhod, broadcasts Message-ID: <340@cui.UUCP> Date: 15 Feb 89 10:37:11 GMT References: <3674@phri.UUCP> Reply-To: vp@cui.UUCP (PREVELAKIS Vassilis) Organization: University of Geneva/Switzerland Lines: 45 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 ). (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