GUIs are nice, but don't overlook command-line interfaces: BEST PRACTICES


This article can also be found in the Premium Editorial Download "Storage magazine: What's in store for storage technology in 2009?."

Download it now to read this article plus other related content.

They may not be as slick as GUIs, but CLIs are powerful and flexible tools for managing storage.

command-line interfaces (CLIs) are often considered a necessary evil in a lot of storage management environments. But it's not surprising to find storage teams using GUI tools for end-to-end management of their environment. When asked about the use of CLI, those same users often refer to it as a complex, counterproductive interface best left to the "pros who need it."

Thanks to the advance of Java and faster computers, there seems to be a natural gravitation toward the use of GUI or Web-based tools to manage storage and SAN devices. It's easier to like something that has pretty pictures than something that's mundane, tedious and, even worse, requires opening a command-line window.

But administrators aren't doing themselves any favors by distancing themselves from CLIs. When you examine the potential benefits CLI tools offer, they quickly become compelling.

While command-line tools may have their roots in Unix environments, they've come a long way and can be used in the same manner on multiple platforms, including Microsoft Windows. Vendors take pride in advertising the platform-neutral aspects of their tools, and much credit goes to their efforts in making sure that no matter

Requires Free Membership to View

which platform you prefer, the experience stays the same. What does vary is the installation location for these tools. Vendors may choose to create a directory or folder that's specific to their product or toolset rather than install them in a common directory or folder. These variations can generally be minimized by tweaking or customizing the installer packages wherever possible. This is more of a software discipline than a CLI-specific issue. Here are some good reasons to take a closer look at CLI.

CLI can be managed without draining resources. Like any software, command-line software can be good or bad. But to say that all command-line software is complicated is like saying all Web interfaces are the same. I agree that remembering various commands, flags and options can become a bit difficult. However, that learning curve is the same when you adapt to any new tool or utility. Most vendors have recognized this and restrict the number of commands and flags. Most of them also support quick help where you can get help on all of the flags, options and, in some cases, quick examples. Unlike some Java-based tools that can drain precious CPU and memory cycles from your laptop or desktop computer, CLI tools generally function in a lightweight environment. Whether you run it locally on your desktop, on a server or even on the device itself, these tools don't consume a lot of precious resources. That makes CLI a very viable option for remote execution via a VPN, slow links and even dial-up connections.

The power of shell. What command-line tools do give you is the power of a shell. Even a company such as Microsoft (which pioneered an all-GUI approach to an operating platform) has acknowledged the power of a user shell interface. Unix and Linux administrators will gladly tell you how powerful a shell environment can be for executing storage and systems tasks. For one, a shell means regular expression search. The output produced by a command can be captured in a log file or buffer and then processed using utilities such as sed, awk, grep and so on to produce a formatted output of relevant data points. On the same note, one can capture the results of executing commands.

Then consider scripting. The term "shell scripting" says it all. There's a plethora of shell scripting environments, including structured languages such as Perl, that can be used to run a command or set of commands against one or multiple devices, aggregate and process the output, and then use that output to execute a follow-on set of commands. This is of immense value for a variety of reasons. It allows easier integration with third-party applications such as backup and recovery software, databases, virtual machines (like VMware) and other applications that need to interact with storage and SAN environments. Also, scripts can be run at regular intervals from a scheduler such as cron without any additional overhead. Cron is generally available in all Unix variants and is accepted as a robust way of scheduling tasks in Unix variants. In addition, scripts can be used to create raw data files that are later fed into data processing software such as Excel to create dashboard-focused metrics such as pie charts, graphs and so on. Finally, scripts can be used to email the output of the execution or its status to users, notifying them of the operation's success or failure.

Shells also help with role-based access. By using programs such as "sudo" and RBAC-capable shells, you can easily allow multiple storage administrators to execute the same scripts while logging the tasks executed by each user. This is immensely helpful in secure environments that undergo regular audits. Indeed, command-line tools can play a variety of watchdog roles. Take daemons and logging. By running commands through scripts as daemons or processes, command-line tools can monitor and log activities to a central reporting server. If this task is performed through a GUI-based tool, it generally requires the use of a dedicated server to accomplish the same task.

This was first published in December 2008

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: