Managing
AIX with SMIT
David Carver
AIX administrators have a variety of tools available to help with
systems administration, including:
- Web-based System Manager, an object-oriented GUI that provides
assistance for less experienced administrators and remote administration
of one or more machines from any client platform.
- The System Management Interface Tool, or SMIT, a task-oriented,
menu-based interface that supports all common administration tasks.
There are two versions of SMIT: an X Window version that provides
GUI features such as point-and-click operations, and an ASCII
text version that can be run on any character-mode terminal.
- AIX command strings, which can be invoked directly by the user
from the command line or through scripts. Both Web-based System
Manager and SMIT execute these same commands from within their
interfaces.
Although each of these methods has advantages in different situations,
my need for fast response time from both local and remote workstations
makes the ASCII -based SMIT version (also known as SMITTY) one of
my favorite administration tools. This article discusses several of
SMIT's capabilities that can simplify management of RS/6000 SP
systems.
SMIT Overview
SMIT is a unique and powerful tool for systems administration.
It offers the following features:
- Two modes of operation (ASCII and X Window)
- An interactive, menu-driven, comprehensive user interface
- User assistance (helps) and prompting
- System management activity logging
- Fast paths to common system management tasks
- Command preview
- User-added SMIT screens
User Interface
The initial SMIT menu (Figure 1) organizes systems management
tasks into high-level categories, such as Software Installation
and Maintenance, Devices, and Users. Lower level menu, selector,
and dialog screens guide the user to choose tasks and enter the
information required to complete them.
SMIT's task-oriented structure allows even novice administrators
can perform routine system administration tasks without having to
learn exact command spellings, syntax, and option values. Standard
function keys are used to invoke common functions such as requesting
help, canceling a screen and returning to a previous screen, entering
a command-line shell, or exiting from SMIT.
SMIT screens reflect the actual configuration of the managed system.
The contents of the menus and other screens depend on what hardware
and software is actually installed and on whether any user-written
SMIT screens have been added. SMIT covers most common systems administration
and configuration tasks.
User Assistance and Prompting
User assistance is available for menus, menu choices, and input
and output fields. In ASCII SMIT, pressing the F1 (Help) key displays
context-sensitive help for the current menu or for the selected
item in a dialog screen. For many selection fields, input prompting
is also provided. For example, the screen for adding a physical
disk to a volume group displays a list of all available disks when
you press the F4 key, so there is no need to recall and enter any
additional commands to find out what disks are available. For Yes
and No and multiple-choice response fields, pressing the Tab key
cycles through the valid responses. You can also select Using SMIT
(information only) from the main SMIT menu for global help on using
SMIT.
System Management Activity Logging
SMIT logs all system management activity in two files that usually
reside in the user's home directory. The smit.log file
records all SMIT actions, including the name of SMIT screens that
were displayed, the command string run by SMIT, output from the
command, and any error output. Additionally, pressing the F8 key
during a SMIT session causes the current screen image to be written
to the smit.log file. The smit.script file records
all high-level command strings and scripts that the system executes.
These log files are useful not only as a record of changes to
the system configuration made via SMIT, but also because lines from
the logs can be copied and pasted into a script when an operation
needs to be repeated many times. SMIT creates the initial valid
command string, which helps ensure that the script will work properly
the first time. See "Using SMIT to Simplify System Administration"
below for an example of how to use SMIT output in a script.
Fast Paths
One common complaint about menu-driven tools is that traversing
the menu hierarchy slows down experienced users. SMIT, however,
has a complete set of fast paths to speed up interaction for power
users. Fast paths are command strings that bypass menu and choice
screens and go directly to an application menu or even to the final
dialog screen for performing the desired task. For example, the
smitty install fast path command displays the Software Installation
and Maintenance menu, while the smitty update_all command
displays the dialog for updating all installed software to the latest
level. Fast paths are available for most of the system management
tasks in SMIT and can be added for user-created screens. Press the
F8 key on a SMIT screen to see the fast path name for that screen.
The following table shows the fast path commands for the menu
choices on the initial SMIT menu. Appendix C in the "How to
Use SMIT" whitepaper, referenced at the end of this article,
provides a complete list of fast paths.
Application Fast Path
Software Installation and Maintenance install
Software License Management licenses
Devices dev
System Storage Management (Physical & Logical Storage) storage
Security and Users security
Communications Applications and Services commo
Print Spooling spooler
Problem Determination problem
Performance and Resource Scheduling performance
System Environments system
Processes and Subsystems src
Command Preview
Pressing the F6 (Command) key on a dialog after completing all
input fields displays the command string that is executed when the
Enter key is pressed. For administrators who want to know exactly
what the tool is doing, this feature is extremely useful for verifying
the command to be executed. It is also a good way to learn command
syntax for future use outside of SMIT. I find that the first time
I perform a task, SMIT is the easiest way to do it. But, command
line is often quicker if the commands are short. Finally, you can
copy the text from the command preview window and paste it into
a script that you're editing, as shown in the example in a
later section.
User-Added SMIT Screens
SMIT also offers the capability of adding your own menus and dialogs
to support other administration tools that you use in your environment.
The AIX General Programming Concepts: Writing and Debugging Programs
manual and the whitepaper referenced below contain instructions
for creating your own menu, selector, and dialog screens, and adding
them to the SMIT database. I have not made much use of this capability
yet, but have found the process of adding customized SMIT screens
seems to be straightforward.
Using SMIT to Simplify Systems Administration
Here are some examples of SMIT's usefulness. I have already
mentioned that SMITTY works on both graphical and non-graphical
terminals. It can also be used over very slow dial-up networks,
through network firewalls that block the X protocol, and from systems
that do not have an X server installed. I have successfully used
SMITTY to reconfigure a system from halfway around the world using
a pay phone and a laptop computer running telnet.
Another example shows how SMIT can make it easier to execute commands
that have a lot of weird parameters. Figure 2 shows the command
preview window that was displayed when I was defining a network
interface for TCP/IP. The mktcpip command in this case used
seven parameters.
A third example illustrates the results of copying SMIT output
into user-written scripts for performing essentially the same task
multiple times. We have two IBM SP2 systems, which have a total
of 99 nodes. Each node has its own CPU, disk, memory, and operating
system, much like a company with 99 RS/6000 workstations running
AIX. If I need to define a remote printer on all of the nodes (see
Figure 3), I can use the Command Preview function to generate a
command string, then cut and paste it to a file called /tmp/mycommand.
The /tmp/mycommand file is called from another script file
called node_command_driver that reads from a list of node
hostnames and copies the /tmp/mycommand file to the remote
node, executes the file on the remote node, and cleans up after
itself.
$ cat node_command_driver
#!/bin/sh
for node in 'cat list_of_nodes'
do
echo $node
rcp /tmp/mycommand $node:/tmp/mycommand
remsh $node sh /tmp/mycommand
remsh $node rm /tmp/mycommand
done
$cat list_of_nodes
azure01
azure03
azure05
...
azure80
$ cat /tmp/mycommand
/usr/lib/lpd/pio/etc/piomisc_ext mkpq_remote_ext -q 'lp' -h
'paperboy' -r 'raw' -t 'aix' -C 'FALSE'
The list_of_nodes file contains a list of node hostnames, and
the /tmp/mycommand file contains the generated command string.
Also in the above example, the SMIT Command Preview function generated
a command string that was a single line, although it may generate
a command string that is many lines long.
Additional Information
For more information on using SMIT, you can start SMIT and select
"Using SMIT" (information only) from the main SMIT menu.
Also see the chapter on SMIT in the AIX manual, General Programming
Concepts: Writing and Debugging Programs in the AIX Documentation
Library Service. You can find the library service online at:
http://www.ibm.com/servers/aix/library
under the heading Technical Publications.
An IBM whitepaper on "How to Use SMIT" is also available
at:
http://www.rs6000.ibm.com/sysv/articles/smit.htm
David Carver is a Senior Operating Systems Specialist at The University
of Texas at Austin's Advanced Computing Center for Engineering
& Science. He can be reached at: dcarver@hpc.utexas.edu.
The Advanced Computing Center for Engineering & Science
(ACCES) provides advanced scientific and technical computing services
to faculty, staff, and students at The University of Texas at Austin.
To promote the advance of computational science, ACCES makes supercomputing
resources available to the nation's academic research community
in the form of vector parallel supercomputers, scalable parallel
multicomputers, scientific visualization systems, data-caching fileservers,
and data archival fileservers as a member of the National Partnership
for Advanced Computational Infrastructure, sponsored by the Advanced
Computational Infrastructure and Research division of the National
Science Foundation. ACCES is a member of the Coalition of Academic
Supercomputing Centers (CASC).
|