Advanced Research Computing
Virtual Visit Request info Apply
MENUMENU
  • About
    • Overview
    • Details
    • Policies
    • FAQs
    • Our Team
    • Testimonials
  • Services
    • Pricing
    • Office Hours
    • Service Requests
      • Request an Account
      • Request Storage
      • Request Classroom Access
      • Request Software
    • Data Portal »
  • Resources
    • Documentation »
    • Workshops
    • Web Apps
      • Doppler (NAU only)
      • Metrics (NAU only)
      • OnDemand
      • XDMod
      • XDMoD Reports
  • Research
    • Current Projects
    • Publications
  • Collaboration
    • CRN
    • External
  • IN
  • ARC
  • Using the ‘screen’ command

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:

  1. Start a command-line shell on one of Monsoon’s login nodes
  2. Start a screen session by running the screen command
  3. 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:

  1. Simply close your SSH client/window
    OR:
  2. Exit your active screen gracefully 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 screen to 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.

  1. Ensure you are logged in to the same system
    (e.g.: wind, rain, dtn1, ondemand)
  2. Run screen -r

The screen -r command will resume an existing screen session. If there are multiple sessions you will have to be specific:

  1. Run screen -ls to list the screen sessions.
    [abc123@wind ~ ]$ screen -ls
    There are screens on:
    1144795.pts-0.wind (Detached)
    1944762.pts-0.wind (Detached)
    2463388.pts-7.wind (Detached)
    3 Sockets in /run/screen/S-abc123.
  2. Then run screen -r <number> to resume.
    Example: screen -r 1144795