Solved

Help to Avoid Idle Telnet Session Timeout

Posted on 2009-05-14
12
1,849 Views
Last Modified: 2013-11-17
I have an  AIX server with Oracle and will either Telnet (Powerterm) or SQLPlus to the server frequently.

My Network group recent switched my connection over to a new segment.  Ever since then, my telnet session and SQLPlus sessions will timeout within a minute of idleness.  It is this way for two of us in our office but one of us isn't having the problem.  So it seems the issue is not with the OS.  I am also using the same Powerterm config files for the session so it can't be my Powerterm configuration.

But that's not my question.  Here's my question:
While I wait for the network guys to figure this out, I need to figure out how to keep my telnet session alive.  I just can't work this way!

Is it possible to create something that the profile or the OS will execute every 30 seconds or so to keep a telnet session alive?  Something that won't interfere with my work but keeps my session alive?  Otherwise, I have to remember to press <enter> every 30 seconds or have to login again and again....

Any suggestions?
0
Comment
Question by:vocogov
  • 7
  • 5
12 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 24388634
you can have a script running in the background that will echo say . every 30 sec:

while true
do
   echo .
   sleep 30
done &
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 24388640
This could be a firewall config issue
0
 
LVL 1

Author Comment

by:vocogov
ID: 24389508
Thanks!
How would I make it run?   Is it something I put into the profile?  Or cron for that user?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Author Comment

by:vocogov
ID: 24389526
I'll need to set it to run for the Root login as well as for my personal login.
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 24389617
try to add it to your .profile file and those users that need it. otherwise add it to /etc/profile
0
 
LVL 1

Author Comment

by:vocogov
ID: 24389868
It seems to be working very well for my root login.

However, I was having trouble exitting my root login.  Each time I'd type 'exit', it would tell me I had jobs running.  After serverl attempts, it finally let me exit.  What do you think?

One of my logins uses csh and gave me an error upon login.  I'm not sure how to adjust the syntax. Here's the error message (it's just one line):

while: Expression syntax.

Thank you!
0
 
LVL 1

Author Comment

by:vocogov
ID: 24389886
Gotta go now so you won't hear from me until the a.m.  Thank you for your help. :)
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 24389963
you may press control D two times or if you use ksh or bash use fg command then press control C then control D. for csh please see the man page of csh to see the syntax and you can include in .login file
0
 
LVL 1

Author Comment

by:vocogov
ID: 24394711
I'm looking up the csh info now.

Is it possible to distinquish between a telnet and a console/terminal session and only have the echo command send for a telnet?
0
 
LVL 1

Author Comment

by:vocogov
ID: 24394750
I don't think this solution is going to work very well.  While in the vi editor, it makes it nearly impossible to work on a file as it pastes characters and echoes the '.'  wherever you happen to be trying to type.  This is just as frustrating as having to logon all the time.

Is there another solution?
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 24394783
look at you firewall setup.

When you are working with vi , etc. then you don't need to run this loop. You can keep the loop in a file and run it when it is needed.

The best solution is to get it fixed in the firewall
0
 
LVL 1

Author Comment

by:vocogov
ID: 24396609
Running this loop from a script everytime I think I'll be pausing to read something or answer the phone isn't going to work well.  I was hoping it would be something behind the scenes that wouldn't interfere with me as I was working.

The network guys finally were able correct the issue a minute ago.  Seems my desktop was set to use an ISA server.  They disconnected it and now I stay connected to my telnet session.

I appreciate your quick response and script.  I'm not sure how to award points.  You submitted solutions that were somewhat helpful but not practical for me.    Will ask EE for suggestions.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
lsuser for specific number of users listed in a file 11 110
how to check for shares on HP-UX 1 59
dot directory in FreeBSD??? 4 80
AIX 5.x set up arrow to recall 11 53
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question