Establishing a ‘screen’ session
Screen enables your login process and connected processes to remain running if/while your ssh connection is interrupted. Its pretty easy:
- Start a command-line shell on one of Monsoon’s login nodes
- Start a screen session by running the
- Initiate any programs/processes
If desired, you now may disconnect from Monsoon while allowing your programs to continue without being actively connected. Here’s how:
- Simply close your SSH client/window
- Exit your active
screengracefully with this key-sequence:
ctrl+a; then release both keys; then hit d
(The ctrl+a, d sequence detaches from the session. The ctrl+a keystroke itself tells
screento listen for subsequent key-commands.)
Now that you are disconnected from screen, your processes will continue to run to completion.
Reconnecting to a ‘screen’ session
To reconnect to screen to monitor or end your programs do the following.
- Ensure you are logged in to the same system
(e.g.: wind, rain, dtn1, ondemand)
screen -r command will resume an existing screen session. If there are multiple sessions you will have to be specific:
screen -lsto list the
[abc123@wind ~ ]$ screen -ls
There are screens on:
3 Sockets in /run/screen/S-abc123.
- Then run
screen -r <number>to resume.
screen -r 1144795