Timeout for lazy users - Help Needed
Posted in 1998
We are trying to implement some method that will log off users from the system after 2 hours of inactivity. We started by looking at the environment variable TMOUT. This works fine for users will AIX prompt but not for users who are taken straight to a menu of the application. We have written a shell script that finds the PID from 'who -u', compares the inactive time and does a kill -1 on the PID, if old. This has worked well in our initial tests and has gracefully terminated user processes and the Informix threads as well. Our current environment(s) -->RS-6000, (AIX 3.2, Informix 5.05 UC1) & (AIX 4.3, Informix 7.24 UC1). Questions: - Can 'kill -1' fail some of the times? - Do we need to graduate to 'kill -6' or 'kill -9' if 'kill -1' fails? - Can this kind of killing the user processes leave orphans behind? - Does anyone have/know of some standard shell scripts etc. that will gracefully exit the lazy users? Thanks for your help in advance.