Technology Insights

Move Long Running Linux Process To Screen Session

Have a long running Linux process open in a SSH terminal window and need to shutdown your computer without killing it? I run into this on a regular basis and never spent the time looking into a solution but this past weekend I actually decided to look and came up with a cool solution called reptyr. 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.

Technology Insights

Find Out The Amount Of Time A Linux Process Has Been Running

I always forget the ps command arguments to see the length of time that a Linux process has been running so I am writing it out here in hopes of remembering it in the future without having to read the ps manpage. I also will know I can easily search this later to find the solution. Below I describe what command to use from a Linux terminal window to display the length of time a specific process or set of processes has been running.