I have 64-bit RHEL 2.6.18-238.el5 running. I access the machine through vpn. I started an application via terminal and while application was running there was disconnection in vpn which closed my terminal. Upon reconnecting to vpn when I opened the terminal I could see that my application is still running ,checked using ps -ef command. Now how can I continue using my application in the terminal. Is there any way to access that running application in the terminal? Please help.Thanks
Add a comment
|
3 Answers
You can use screen tool for situations like this.
First install the screen tool. Then type screen and run the application. If the VPN is disconnected, Log in to the server again and type screen -ls.
It will list available screen sessions.
To connect to a screen session type screen -r <session_name>. From there you can continue from the last disconnected position.
It's a recurring question here. See
- How can I disown a running process and associate it to a new screen shell?
- How can I control an existing remote shell?
- How to screen'ize already running session?
- How can I switch between ttys without using screen?
- is it possible to run job in foreground after user logout
- Is it possible to transfer a running process to your terminal?
- Is it possible to detach a process started from one ssh session using another ssh session?
- view stdout for another pts
- How to attach terminal to detached process?