Operating System - HP-UX
1832087 Members
3047 Online
110037 Solutions
New Discussion

Disconnect Idle remote user

 
SOLVED
Go to solution
Ferdie Banu
Occasional Contributor

Disconnect Idle remote user

Is there a way to disconnect an idle remote user running an application connected via tcp/ip? Is socket keepalive solve this problem?
6 REPLIES 6
Ravi_8
Honored Contributor

Re: Disconnect Idle remote user

Hi

#fuser -k

will kill all users using that application
never give up
Sanjay Kumar Suri
Honored Contributor

Re: Disconnect Idle remote user

Check autologout at:

http://www.docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90046/B2355-90046_top.html&con=/hpux/onlinedocs/B2355-90046/00/00/53-con.html&toc=/hpux/onlinedocs/B2355-90046/00/00/53-toc.html&searchterms=autologout&queryid=20040225-230300

The use of keepalive messages allows sessions to be timed out if the client crashes or becomes unreachable.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Steven E. Protter
Exalted Contributor

Re: Disconnect Idle remote user

The TMEOUT parameter will probably do this.

So long as no application is running. Otherwise its grep the ps -ef and kill the process.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jakes Louw
Trusted Contributor

Re: Disconnect Idle remote user

Have a look at the ndd settings for set_keepalive, and then look at the environment variable TMOUT.
The ndd setting would be activated in your NIC config file, and the TMOUT can be set in /etc/profile for a global effect.
Trying is the first step to failure - Homer Simpson
Ferdie Banu
Occasional Contributor

Re: Disconnect Idle remote user

Assuming that an application run in microsoft windows and connected to a database in hp/ux via tcp/ip. Is there a way to disconnect or terminate the application if its idle for a certain period of time let say 30 minutes would be the time limit?

Any idea will be much appreciated...

Thank you for your time guys....
Bill Hassell
Honored Contributor
Solution

Re: Disconnect Idle remote user

The autologout and TMOUT parameters only work for the shell. Since the users are running an application, the applicationmust be rewritten to detect idle time and terminate when exceeded.

If rewriting the application is not an option, you can kill the connection but before you ever try this, you must determine whether it is safe to kill these connections. Some applications are poorly written and can corrupt data files when connections are terminated. Once you have verified safety, you'll have to write a script to track the connection time using options in ps, then issue a kill to the login process which should then terminate the application.


Bill Hassell, sysadmin