Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
One of my customers telnets into Red Hat Linux. I have noticed that periodically users are automatically disconnected from the server. I imagine this occurs when the user has been idle for too long. What I would like to know is in which file(s) the idle timeout is configured and if it is not specified, what is its default?
Today, a user locked up in Windows 98 while a telnet session to Linux was open on that PC. They powered their Windows PC off and on to reboot it. From log files, it looks like the telnet session finally terminated 2 hours later. Is this the idle timeout default?
I have searched the web and various books and can not find the information I seek. I would appreciate any help from the linuxquestions community.
I've heard the same problem which had happened to my friend too. He told me that to solve this is to set the time out both in TelNet configuration file and the user profile.
Thank you for responding. After a bit more research, I believe that I have a better understanding of what is happening. Users do not get disconnected just because they are idle for too long. When they are idle, the linux telnet process sends a KeepAlive signal to their PC. If the PC is still running, the client telnet process responds that it is there. This allows users to remain connected when they walk away from their PC, even overnight. (Not a great situation, but it doesn't appear to be problematic.)
Problems arise however, when a user reboots their PC (for whatever reason) while telnet'ed into the linux box. The same "idle too long"/KeepAlive process is followed, but since the client telnet session is no longer running, it can't respond and after a series of failed responses, the host telnet process kills the session. Unfortunately, the idle too long threshhold seems to be defaulting to 2 hours. Thus when this happens during the day, there can be a long wait before record locks and other settings are freed.
If we could identify idle, disconnected jobs, they could be killed, which would release the resources. But there is no one on site with that expertise. What I would like to do is find a way to reduce the 2 hour idle threshhold to say, 30 minutes.
Does anyone know which (if any) telnet configuration file and parameter would allow me to set this? Also, TK Tech, I don't understand which User Profile you are referring to? Do you mean a Windows User Profile or a linux .bashrc or .profile file? Of course, I would also be interested in other solutions to the problem. Thanks, again.
Originally posted by sshatz Thank you for responding. After a bit more research, I believe that I have a better understanding of what is happening. Users do not get disconnected just because they are idle for too long. When they are idle, the linux telnet process sends a KeepAlive signal to their PC. If the PC is still running, the client telnet process responds that it is there. This allows users to remain connected when they walk away from their PC, even overnight. (Not a great situation, but it doesn't appear to be problematic.)
Problems arise however, when a user reboots their PC (for whatever reason) while telnet'ed into the linux box. The same "idle too long"/KeepAlive process is followed, but since the client telnet session is no longer running, it can't respond and after a series of failed responses, the host telnet process kills the session. Unfortunately, the idle too long threshhold seems to be defaulting to 2 hours. Thus when this happens during the day, there can be a long wait before record locks and other settings are freed.
If we could identify idle, disconnected jobs, they could be killed, which would release the resources. But there is no one on site with that expertise. What I would like to do is find a way to reduce the 2 hour idle threshhold to say, 30 minutes.
Well, good explanation for me, thanks.
Quote:
Does anyone know which (if any) telnet configuration file and parameter would allow me to set this? Also, TK Tech, I don't understand which User Profile you are referring to? Do you mean a Windows User Profile or a linux .bashrc or .profile file? Of course, I would also be interested in other solutions to the problem. Thanks, again.
As I've called my friend again, he said "the time out set in .bashrc of each user, this also can log out the user who is idling over the limited time out." Come on try it...
Good luck !
PS: Sorry, If my friend was at home I would ask him to help you, but he was on holiday. Telephoning in my sweetest country is v'ry expensive to my sal--y...
If we could identify idle, disconnected jobs, they could be killed, which would release the resources. But there is no one on site with that expertise. What I would like to do is find a way to reduce the 2 hour idle threshhold to say, 30 minutes.
the default timeout for the session you're talking about is set in /proc/sys/net/ipv4/tcp_keepalive_time (on my system running SuSE 7.0).
The default value for this keepalive is 7200 seconds... simply edit the file and put the value you want (1800 in your case for a 30 minutes keepalive).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.