Pair Programming for Sysadmins

Wilfred Springer

At Xebia, we work quite a lot with teams distributed across the globe. In the true spirit of extreme programming, that means your pair programming buddy might very well be in a completely other timezone. In my team, Mikogo is quite a popular solution in situations like these. However, it is not always the most efficient solution. Especially if you and your team mate are working together remotely on a system neither yours nor your buddy's. Which is exactly what we are doing if we are working on our EC2 based deployments. (That basically means someone from our Dutch team working with someone in our Indian team on a system in the US.)

In those cases, you definitely need to take a look at screen:

Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells).

Think of it as VNC for terminals sessions instead of desktop sessions. (That may not be a very accurate description of what it actually is, but for sake of this blog post, that will do.) Screen is just awesome. True, it does not give you a full-fledged Graphical UI, but - hey - who needs that anyway? The terminal has never let me down. In fact, if you are working on deployment than it most likely involves systems without X support or a frame buffer anyway. So it does not make an awful lot of sense to use Mikogo to transmit loads of information from your own Desktop across the Internet (pixels) to another Desktop, just to share the same viewport on a bunch of characters.

The screencast below shows you how to do it. It's fairly easy. It will demonstrate how two guys - one interesting fella called Wilfred and his compadre Jack - are working together on the same Linux box. The upper terminal is mine, the lower terminal is Jack's. Just imagine these terminals to be opened on our own systems.

Comments (6)

  1. Dan Martin - Reply

    September 7, 2009 at 5:17 am

    Nice post. I'm guessing you mean VNC, not VLC.

    • Wilfred Springer - Reply

      September 7, 2009 at 6:19 am

      Ah, glad you caught that. I changed it instantly.

  2. Andrew Phillips - Reply

    September 7, 2009 at 8:13 am

    Another feature of screen we use a lot is the ability to detach a terminal session (search for "detach [-h]" in the man page referenced in the post) and reconnect to it later. This comes in especially handy if, for instance, you want to kick off a long-running task via SSH and then disconnect from the machine.

  3. [...] Pair Programming for Sysadmins Hab gar nicht gewusst, was screen alles kann, vlt. soll ich mir das doch mal genauer anschauen. [...]

  4. Vincent Partington - Reply

    September 28, 2009 at 7:06 pm

    @Wilfred Springer: Cool use of screen, a tool any system admin worth his money should know.

    @Andrew Phillips: Detaching and then reattaching (I use screen -dr) is even nicer when suspending machine images (think VMWare). After resuming the image you can get back to where you were before you suspended it.

  5. iwein - Reply

    November 19, 2009 at 6:24 pm

    just so you don't have to watch the whole thing again for the command (and if you're too lazy to use man):
    to start a screen: screen -S
    to join a screen : screen -x

Add a Comment