unix session

Hi,

we have our shell sessions timing out after every 5 minutes , if there is no activity.

Is there any way i can keep my session for longer than 5 minutes or untill i end the session.

may be any dummy program that runs background and doesn't take up lot of resources or any ideas.

Thanks for your time
Thomas.

Perhaps you have $TMOUT set. Check the man page for your shell.

Just type more and your shell will survive.

have a command running that constantly produces output like
e.g. watch, sar, vmstat, or a one-line while loop

Thanks for your suggestions,

But when i try vmstat to run for every 4 minutes for next 8 hrs in & , i couldn't keep the shell session from timing out, I think this is probably set by our admin as a standard, i just hate to re -login everytime it sessions out.

when you said one line while loop i didn't get it. .. can you please elaborate on this..

Thomas.

A standard one liner for keeping sessions alive:

while true; do echo ""; sleep 300; done &

You can fiddle around with the length of the sleep command depending on the timeout interval that you have set.

YGOR's correct. If your shell is timing out you need to set the TMOUT env variable. TMOUT=60;export TMOUT should do it. You can check it by using
echo $TMOUT or env | grep -i TMOUT.

Mr-synapse