[comp.os.vms] time out idle users

KVC@ENGVAX.SCG.HAC.COM (Kevin Carosso) (07/23/87)

Mark Granoff writes:

> I am writing a 'new and improved' time-out-style program that, among
> other things, stops idle processes.  The catch is that our word
> processing users would rather not have to recover their documents if
> they are timed out (i.e. they would rather have the document saved for
> them).  In other words, I need to send a 'save file and exit' command
> to the word processor (MASS-11) and have it look like the user typed
> it.

Someone here (Chris Yoder) has written a very nice idle-job time out program
which we will send out to the net if people are interested.

It's features are:

1).  Calculates idle time by summing up CPU usage and I/O counts for
     all process' in a job tree.  Based on this, it decides if
     the entire tree is idle or not.  Other idle killers watch on
     a per-process basis and tend to nuke your TPU subprocess or
     display other anti-social behaviour.  If the tree is idle, it
     takes action against the master process of the tree.

2).  Considers ONLY interactive master processes.  We have no use for
     considering batch or detached jobs.  Our goal was to get users
     who leave their terminals unattended or forget to log off.

3).  Whenever possible, disconnect the user, don't log him off.  Uses
     a back door into the terminal class driver to disconnect the terminal
     if virtual terminals are enabled and the terminal is disconnectable.
     Otherwise will kill the master process.  Configurable so you can
     have some people killed, others disconnected.

4).  Allow user's (within reason and controlled by sysmgr) to set their
     own idle time limit.  This because we have user's with different
     patterns of work.  Because of 3) above, people do try to be reasonable.
     In fact, before we had 3) we tended to exclude ourselves, system's
     people, from the idle watcher.  Now, however, we don't.  I like being
     able to go home with something on my terminal knowing it'll be disconnected
     shortly after it is done because I set my idle time down to a low number
     of minutes.  I don't mind getting disconnected when I forget to log
     off at lunchtime!

Getting disconnected may be a reasonable alternative for those MASS-11
users.  At least it's doable.  You could try forcing input through another
back door into the terminal class driver, but it'd be a LOT nastier than
the CLASS_DISCONNECT call we do.  See my pseudo-terminal driver distribution
for how a port driver feeds characters to a class driver.  But I don't
recommend going that route...

        /Kevin Carosso                     kvc@engvax.scg.hac.com
         Hughes Aircraft Co.               kvc%engvax@oberon.usc.edu

ps.  Hope Chris doesn't mind me opening my big mouth again!

THURY%MCOPN1@eg.ti.COM (Denny Thury -- VAX System Sup -- 952-2066) (07/25/87)

In an earlier message, Kevin Carosso discussed an idle process monitor, by
Chris Yoder, that would disconnect, instead of delete, an inactive process.
During that discussion, Kevin mentioned something called CLASS_DISCONNECT.
  
Sorry to bother the entire net with this, but CSNET couldn't/wouldn't
recognize Kevin's address!

Kevin,

  Could you clue me in on the CLASS_DISCONNECT you described?  I've
  recently written such a beast, trying to DISCONNECT idle processes,
  instead of blowing them away, but have had some problems.  I chose to
  go to the fiche and "emulate" the DCL DISCONNECT command using the
  IO$M_DISCON modifer.  This seemed to work just fine, EXCEPT, DCL has an
  outstanding read request which must be cancelled, which I've done.  BUT
  this TOO causes some problems, which we've learned to live with for the
  time being. 

  Your write-up seems to imply you may have a different/better "back-door"!
  I'm very interested! 

    Thanks,
	Denny Thury	                 CSnet : THURY%MCOPN1@TI-EG
        VAX Systems Support              ARPA  : THURY%MCOPN1@TI-EG.CSNET
        Texas Instruments Incorporated
        McKinney, Texas