Quote:
Originally Posted by kirukan
I have connected my server from remote by ssh and i have executed a command but unfortunately my ssh connection has disconnected, but still the command that i have executed is in progress, how can i recall and view that existing process at my remote ssh shell.
Actually i have to get final statistics of ab tool. Please anybody help me.
Thanks
|
Unfortunately that isn't possible. You can't connect to a disconnected session.
The normal method for working around that is to use screen.
Type screen at the prompt, it will bring you back to a prompt, execute your programs as normal, when your ready to disconnect hit ctrl-a d and the session will disconnect (if you get disconnected it's effectively the same result). When you wish to reconnect to the session you would execute screen -r and you would resume control of the session. As long as you've disconnected from your screen you can logout, change terminals, etc.
As a general rule I run screen on login first thing and when I'm done close it (exit/ctrl-d) if I don't need to be able to reconnect just in case something happens and I get disconnected.
Of course screen doesn't help if the machine reboots or something of that nature... but it will prevent the agony of network connects and switching between multiple computers (work and home).