Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Forgot to run a process in 'screen'?  (Read 3834 times)

0 Members and 1 Guest are viewing this topic.

Karun

  • Guest
Forgot to run a process in 'screen'?
« on: September 24, 2014, 05:38:54 pm »

Started a long-running process over ssh, but have to leave and don't want to interrupt it? Just start a screen, use reptyr to grab it, and then kill the ssh session and head on home.

The reptyr application allows you to open screen and migrate the process to the screen terminal and away from the terminal connection opened without screen. This allows you to detach from the window without killing the process. Below is a quick overview of installing reptyr and how to use it.

Either use yum install reptyr

Or

Use git clone To Download reptyr Source:
   - git clone https://github.com/nelhage/reptyr.git
   - cd reptyr/
   - make
   - make install

With the above commands out of the way you are now ready to use reptyr to attempt to migrate a process. To do this you must obtain the PID or Process ID of the process you want to migrate (you can use ps -ef | grep processname)and then migrate it using the below command.

reptyr -s 'PID'

That's it..!!