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..
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.