1821052 Members
2337 Online
109631 Solutions
New Discussion юеВ

auto disconnect

 
Nick D'angelo_3
Occasional Advisor

auto disconnect

I am constantly running into the situation where users do not logoff of the HP
Server for periods (weeks) at a time.

Rather than killing the processes one by one, is there a 'nice' way to setup a
cron entry to do this every 6 hours or so. By nice, I mean that I do not run
the risk of crashing the database (progress) or crashing the machine.

Any insights would be great to have.

Thanks,

Nickd
2 REPLIES 2
Paul Heffels_1
Frequent Advisor

Re: auto disconnect

Hi,

I guess you could write a script that would do such a thing but I really think
you should be carefull.
You could use the output of "who -u" to get the logon-date which you could
match with the current date. This command also gives the pid which you could
use to kill the connection. Please realize that users who have big jobs running
could loose a whole lot of work by killing them.
Alan Riggs_1
Regular Advisor

Re: auto disconnect

If you use either the ksh or posix shell as the default user login shell, then
you can set the TMOUT parameter ot end the user's shells after a set period of
inactivity. This can be set in either individual user profiles or in
/etc/profile or both (default and customized values). A couple of notes:

1) The shells can be compiled with a maximum value (in seconds) for TMOUT. I
do not know whether this is the case in HP.

2) Inactivity is defined as seconds without a carriage return since the $PS1
prompt was last displayed.

2a) Because of (2), long jobs running in the background are vulnerable to
termination if you use TMOUT. Make sure that is reasonable in your environment
and notify your users where appropriate.

3) If you allow your users to maitain there own .profiles, they can easily
override the system default.

4) man ksh & man sh-posix for more details