Newsgroups: comp.unix.wizards Path: utzoo!utgpu!cunews!bnrgate!bwdls61!pww From: pww@bnr.ca (Peter Whittaker) Subject: Re: load sharing Message-ID: <1991Feb6.173736.11922@bwdls61.bnr.ca> Sender: usenet@bwdls61.bnr.ca (Use Net) Organization: Bell-Northern Research, Ltd., Ottawa, Ontario, Canada References: <25860@adm.brl.mil> Date: Wed, 6 Feb 91 17:37:36 GMT In article <25860@adm.brl.mil> pjw@usna.navy.mil, , jw@math30, (Peter J. Welcher (math FACULTY)) writes: (after many deletions...) > >I have a question, especially for the academic readers of the group. >(And it may just be I'm missing the obvious, or re-inventing a wheel.) > >Writing a script that does something with rwho is a possiblity, but there's all > >I've written a C program that forks (to get around timeout delays) and then If you are going to force people to login to a single front-end host, then why not write an program that keeps track of who has been assigned to each machine, then assigns each new user to the least-busy machine? (i.e. using rlogin, or what have you). When a user logs out of the assigned machine, strike them from the "assigned machine" table. As long as your users are doing roughly the same amount of work (which should be true if they are all working on the same assignment) your machines will be more or less equally loaded. It's not terribly elegant, but it would work. If you wanted to double check the load on a machine before assigning a user to it, query it via UDP (if you are on a LAN, UDP should be fairly reliable). If it says it is too busy, query the next machine in your "machine assignment" table. There are more elegant solutions, but this one should be quick to write and should work passably well.