June 9th, 2007

Sysadmin’s best friend

I’ve learned one more thing about Unix shell administration. In the past days I had to launch a few ‘make’ processes on a remote host via a SSH terminal, and each time I had to wait (keeping my Windows XP client running) until the process completed because I didn’t know any way to make the process running after I leave the terminal. It was becoming a huge handicap for me: I’m used to administer a lot of Microsoft Windows server machines all around the globe simply by creating, disconnecting and reconnecting a lot of RDP sessions where all processes I launch live until my logout… so I decided to spent some time searching a solution like that in the Unix field.

I only found the possibility to suspend and run in the background multiple simultaneous processes into the same terminal session, but soon I realized that it does not solved my issue, since all the processes were always killed as soon as I get disconnected from the SSH virtual console. Thus I posted my issue in the comp.unix.shell Usenet group, and after some days I get the definitive solution:

the SCREEN utility!

You can get it from the port collection under sysutils/screen, and is a very nice piece of software to free your commands from the risk of a network connection break when you are working on a virtual terminal to administer your Unix host.

Screen capabilities go far beyond the attach/detach process. You can read a quite complete guide to use and configure screen here.