Advanced Research Computing
Virtual Visit Request info Apply
MENUMENU
  • About
    • Overview
    • Details
    • Terms of Service
    • FAQs
    • Our Team
    • Testimonials
  • Services
    • Coffee/Office Hours
    • Data Portal »
    • Pricing
    • Secure Computing
    • Service Requests
      • Request an Account
      • Request Classroom Access
      • Request Data Science Development/Consulting
      • Request Software
      • Request Storage
  • Resources
    • Documentation »
    • Workshops
    • Web Apps
      • Doppler (NAU only)
      • Metrics (NAU only)
      • OnDemand
      • XDMod
      • XDMoD Reports
  • Research
    • Current Projects
    • Publications
  • Collaboration
    • Arizona Research Computing
    • CRN
    • External
  • IN
  • ARC
  • Working With an Unstable Internet Connection

Working With an Unstable Internet Connection

If you are working with an unstable internet connection via ssh and you don’t want to lose your progress every time you disconnect, the screen command allows you to run a background session that you can reconnect to later.

Starting 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.
    [abc123@wind ~ ]$ screen -r 1144795