Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
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.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.