Sys admins are like smokejumpers who parachute into fires, fighting them until they are out, or at least under control. When you jump into the fire, you only have the tools you brought with you.

TUIs, a Smoke-Jumping Admin’s Best Friend

The Supercomputing Conference always causes me to reflect on the tools I use for system administration and the tools I would love to have. The most difficult situations I encounter as an admin occur when I can’t get the display server to work on a remote system, with no easy way to plug in to a crash cart. Usually I can SSH to the system and poke around to see what is happening: I’m definitely going to want to test the node to see whether my corrections work. This combination of searching, debugging, and testing over a simple login with SSH is not always easy. Sometimes I miss graphical tools, particularly, if I’m looking at time histories of the node. (My favorite is users swapping the node to death or invoking the dreaded out-of-memory (OOM) error, which is sometimes difficult to find.)

For situations like these, I reach for text-based user interface (TUI) tools. They give me some reasonable graphics while not requiring a display server on the system. TUIs are extremely useful but underrated admin tools, of which I’ve used many over the years. In this article, I review a few TUI-based admin tools and applications and point out some tools you can use to create your own TUIs for your situation.

User Interface

About everyone in the world uses a graphical user interface (GUI) to access their desktops, laptops, and mobile devices. The icons and visual indicators of the interface, with some text as a secondary form of input, were developed because command-line interfaces (CLIs) were perceived to be slow and inefficient and could not present graphical images and volumetric data easily. Pretty much every operating system on any device uses a GUI: Windows, macOS, Linux, iOS, Android, desktops, laptops, phones, tablets, ATM machines, and so on. They are the number one way for people to interact with computer systems with a mouse, finger, or stylus.

To utilize a GUI, you need to have some sort of display server on the computer that interacts with a window manager, which is the GUI. These display servers can be quite complicated and require a great deal of computational, memory, network, and disk resources. What happens, though, if the display server misbehaves and you have to debug the problem? How do you interact with the system?

One of the first things I learned as a system administrator is always to have a CLI link to systems so I can edit configuration files, monitor the system, restart services, read logs, or accomplish any of a host of tasks. Within one month of becoming a system administrator, I had a server go sideways, requiring me to log in remotely to stop and restart some services. Having a CLI connection allowed me to do this.

CLIs respond to a command entered by the user, whereas GUIs respond to a click on an icon, perhaps with a bit of input typed into a dialog. However, if the GUI display server is not behaving well and you want to monitor multiple system metrics over time, a CLI won’t necessarily give you the desired results. What you really need is a text-based GUI of some sort. In other words, a TUI.

Text-Based User Interfaces

TUIs were named after GUIs. Like GUIs, they display computer graphics, but they do it in text mode, not graphics mode. The more advanced tools allow you to use a mouse or can have multiple, even overlapping, windows.

As a rough approximation, TUIs are sort of in between a CLI and a GUI. They make CLIs more interactive and can present more information. Relative to GUIs, TUIs can be faster, don’t require display servers, and can be used over SSH. They also can display time-varying information, unlike a CLI.

Before GUIs became standard, Microsoft DOS applications used TUIs, including WordPerfect, WordStar, QBasic, GW-BASIC, QuickBASIC, and Turbo Pascal, which used Turbo Vision for the TUI. Each had its own TUI library because operating systems did not have a standard at the time.

Administration tools are the primary users of TUIs.