gudii9
asked on
sign out issues on linux production servers
unix server keep sign out after 1 minute or so on production.
is there is a way i can run some process like
tail -f xyz.gz
to keep continuous rolling until i cancel that so that it wont sign out on me while i focus on some other work for 30 miinutes and come back it should not signout
please advise
is there is a way i can run some process like
tail -f xyz.gz
to keep continuous rolling until i cancel that so that it wont sign out on me while i focus on some other work for 30 miinutes and come back it should not signout
please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
$ watch -l xyz.log.20181011
watch: invalid option -- 'l'
Usage: watch [-dhntv] [--differences[=cumulative ]] [--help] [--interval=<n>] [--no-title] [--version] <command>
i get above error
please advise
watch: invalid option -- 'l'
Usage: watch [-dhntv] [--differences[=cumulative
i get above error
please advise
ASKER
start by describing how you've logged into your production server.
i have putty
i go to the particuler server say
server6
it asks username i give like john
it asks interactive password i give my 8 digit passcode i set earlier along with rsa token code which keeps on changing every few secons
i have putty
i go to the particuler server say
server6
it asks username i give like john
it asks interactive password i give my 8 digit passcode i set earlier along with rsa token code which keeps on changing every few secons
Please check the TMOUT environment variable:
echo $TMOUT
I guess you get 60 back.
echo $TMOUT
I guess you get 60 back.
The normal way to disable connection timeouts with ssh is to pass -o TCPKeepAlive=yes which means all connections are persistent... never timeout...
http://www.nth-design.com/ 2010/05/10 /using-kee palive-in- putty/ shows how to enable this in Putty.
http://www.nth-design.com/
@David, TCPKeepAlive is for keeping traffic so NAT tables / statefull inspection data in a firewall don't get dropped. And that mostly peters out with 20 something minutes.
Hi,
In terms of using 'watch', I missed typing 'ls' in there. It should be:
As mentioned above, 'screen' is possibly a good option.
Alan.
In terms of using 'watch', I missed typing 'ls' in there. It should be:
watch ls -l xyz.log
However, no idea if that will work or not (in terms of keeping the session alive).As mentioned above, 'screen' is possibly a good option.
Alan.
I suggest you give the KeepAlive trick a try + see if that fixes your problem.
If this fails, try https://bjornjohansen.no/s sh-timeout which discusses sshd settings which effect session life.
Keep in mind. If you change sshd settings, you must restart sshd + then start new sessions for new settings be take effect.
If this fails, try https://bjornjohansen.no/s
Keep in mind. If you change sshd settings, you must restart sshd + then start new sessions for new settings be take effect.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you check the TMOUT variable. If set that is the max idle time for a shel before it logs you off.
if TMOUT has been set you can just change it by setting to the right number of seconds:
TMOUT=1800 # 30 minutes
TMOUT=3600 # one hour\
TMOUT=86400 # one day
before the idle timer drops the shell.
In your case it probably is 60..
echo $TMOUT #will tell.
Please confirm it's setting ro tell here TMOUT is not set..
if TMOUT has been set you can just change it by setting to the right number of seconds:
TMOUT=1800 # 30 minutes
TMOUT=3600 # one hour\
TMOUT=86400 # one day
before the idle timer drops the shell.
In your case it probably is 60..
echo $TMOUT #will tell.
Please confirm it's setting ro tell here TMOUT is not set..
ASKER
$ echo $TMOUT
above did not return any value
i do not have any control on these boxes except i can read those logs
any alternate trick to keep session alive all the time?
above did not return any value
i do not have any control on these boxes except i can read those logs
any alternate trick to keep session alive all the time?
ASKER
$ watch -l xyz.log.20181011what is wrong with above command?
watch: invalid option -- 'l'
Usage: watch [-dhntv] [--differences[=cumulative]] [--help] [--interval=<n>] [--no-title] [--version] <command>
i get above error
please advise
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you are not allowed to extend the timeout I think screen might be your only option. But if you also don't have screen or aren't allowed to install it, your options will be extremely limited...
It is a bit uncommon for someone that is allowed log access to not have some influence on needed tools to do that job...
It is a bit uncommon for someone that is allowed log access to not have some influence on needed tools to do that job...
ASKER
Missing the command to watch "ls". The -l option applies to the ls command not the watch command.
Type: watch ls -l xyz.log.20181011
above command worked.
how long it keep watching
It keep watching until you stop it; meaning when you do ctrl-c, it will cancel the command.
ASKER
i tried
tail -f xyz.gz
problem i faced after some time that file consolidated and new file getting created and my tail is failing and server is signing out again
does watch do that continuously?