Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!scc%computer-lab.cambridge.ac.uk@ucl-cs.arpa From: scc%computer-lab.cambridge.ac.uk@ucl-cs.arpa (Stephen Crawley) Newsgroups: net.unix-wizards Subject: Yet another idle daemon Message-ID: <1598@brl-tgr.ARPA> Date: Thu, 19-Sep-85 06:36:20 EDT Article-I.D.: brl-tgr.1598 Posted: Thu Sep 19 06:36:20 1985 Date-Received: Fri, 20-Sep-85 06:18:10 EDT Sender: news@brl-tgr.ARPA Lines: 34 <> In the middle of the day we often run out of Ring (LAN) virtual terminal ports into our VAXes. When the flurry of idle daemon programs came through a month or so ago, I looked at them and decided that they did not suit our needs. The idledaemon.c looked promising until I noticed that it used an option for ps which does not exist in 4.2bsd. Having nothing better to do ((lies! they shout)) I had a go at writing a daemon myself to solve our local problem. The daemon tries to keep a small number of a pool of terminals (in this case ports) free for new sessions. When there are not enough free terminals, it checks for idle sessions, sends warnings and if necessary kills sessions in order of decreasing idleness. The daemon tries to avoid annoying people by only killing idle sessions when there is a shortage of free. Sessions are only idle if there has been no terminal input, and if there are no active processes attached to the terminal. The latter is determined by grubbing around in the process table, so the program is 4.2bsd specific. (Sorry guys, but I was trying to make the daemon efficient ... 14 secs CPU in 18 hours, checking every 5 minutes ...) Is anyone interested in having a copy of this program and the manual entry? Please send mail to me personally. I will post it to net.sources if there is sufficient demand. Stephen C. Crawley ARPA: scc%cl.cam.ac.uk@ucl-cs.ARPA SMail: Cambridge Univ. Computer Lab., JANET: scc@uk.ac.cam.cl Corn Exchange Street, UUCP: {ukc,kcl-cs}!cl-jenny!scc Cambridge CB2 3QG, PHONE: +44 223 352 435 England. Brought to you by Super Global Mega Corp .com