System Management Interface Tool (SMIT)

This chapter provides an overview of SMIT. The basic tasks that are possible using SMIT are described. This section does not cover all the aspects of SMIT. See the chapter titled "System Management Interface Tool" in System Management Guide for AIX Version 3.2 for further details of SMIT.

The System Management Interface Tool (SMIT) is the primary tool for managing the AIX V3 system. The SMIT facility presents a menu based, task oriented interface to the commands required to manage the system. SMIT steps you through the desired task with the use of menus, selectors and dialogs. SMIT frees the user from the details of complex command syntax, valid parameter values, and system command spelling. In addition, SMIT creates log files which contains the commands used in all the menus during SMIT execution. These logs can be used to duplicate system configuration or to learn how to use specific commands. The SMIT facility runs in two interfaces, ASCII (non-graphical) or AIXwindows* (graphical).

Tasks Performed by SMIT

In order to understand the tasks that can be performed using SMIT, enter the command smit -C or smitty. Both of these commands start SMIT in ASCII interface. You should get a screen which looks like the following:


                               System Management
Move cursor to desired item and press Enter.

Software Installation & Maintenance
Devices
Physical & Logical Storage
Security & Users
Diskless Workstation Management & Installation
Communications Applications and Services
Spooler (Print Jobs)
Problem Determination
Performance & Resource Scheduling
System Environments
Processes & Subsystems
Applications
Using SMIT (information only)


F1=Help F2=Refresh F3=Cancel F8=Image
F9=Shell F10=Exit Enter=Do

Figure: Example of SMIT Top Menu

The top menu titled System Management provides the following option menus to perform the tasks given in the following list:

Software Installation and Maintenance
Install and maintain optional software on standard systems.
Devices
Add, change, list or remove devices.
Physical & Logical Storage
Add, change, remove, list and mount all file systems, paging spaces, logical volumes, physical volumes, volume groups and so on.
Security & Users
Add, change, remove or list users or user groups and their characteristics.
Diskless Workstation Management & Installation
Manage diskless workstations.
Communications Applications and Services
Perform configuration and management tasks for NFS**, SNA, TCP/IP, HCON and other communications applications.
Spooler (Print Jobs)
Manage queueing system and print jobs.
Problem Determination
Work with dumps, traces, error logs and hardware diagnostic service tools.
Performance & Resource Scheduling
Set the system run level, report system activity or schedule jobs.
System Environments
Stop the system, set the time and date, change the system console, change the language environment, change keyboard mapping and broadcast messages to the users.
Processes & Subsystems
List, start, stop or query System Resource Controller subsystems like TCP/IP, SNA and so on. Show or remove processes.
Applications
Additional application software can be installed in this section of SMIT.
Using SMIT (Information Only)
Bring up general help and an overview of SMIT.

Elements of SMIT

The SMIT user navigates through a hierarchy of menus and name select screens to reach dialog screens, where values are supplied to System Management attributes.

Menu Screens
They provide paths for various System Management tasks.
Name Select Screen
Many System Management tasks require the user to identify the object on which an action has to take place. An example would be, if the user wished to remove an existing print queue, the system would need to know which queue to remove. The name selector screen is where the user identifies the queue to remove, by its name.
Dialog Screens
Dialog screens present attributes for a given object values and the current values associated with those attributes. As the user supplies values to the attributes, SMIT builds the command to execute by adding the appropriate flags, values, and parameters. Upon completing editing of attribute values, the user can commit the dialogue, whereby SMIT executes the command string it has built.
Help Screens
SMIT accesses the online publications when the user requests help.
Output Panel
When a dialogue is committed and the command is executed, SMIT generates an output screen to display stdout and stderr outputs.
Lists
When an attribute has a finite set of possible values, the user can call up the list of those values. Then he uses the cursor keys to select the desired value from the list.
Pop-Up Panels
SMIT provides pop-up panels for circumstances such as: "Are you sure?", or to display error messages.

SMIT Command

When SMIT is invoked with the command smit, the system will check your terminal type and bring up the motif version if you are in a windows environment or the ASCII version if you are on an ASCII terminal. Use the command smit -C or smitty to start ASCII version of SMIT in an AIX window. However, the window must be defined at least 80 columns by 25 rows to properly execute.

The syntax for smit is as follows:

smit [ -C |  -M ] [ -D ] [  -f ]
[  -h ] [  -l PathName ] [  -o  PathName ]
[  -s PathName ] [  -t ] [  -v ] [ [  -m | -n |  -d ] FastPath ]
[  -X ] [  -x ]

The explanation for some of the flags follows.

-C
Starts SMIT using an ASCII (also called Curses) interface.
-D
Sets the debug mode; sets -t and -v flags.
-d FastPath
Identifies that the FastPath is the name of a dialogue.
-f
Allows standard in and standard out from SMIT to be redirected.
-h
Displays the command usage message.
-l PathName
Redirects the smit.log file to the specified PathName file.
-M
Starts SMIT using a windows (also called Motif) interface.
-m FastPath
Identifies that the FastPath is the name of a menu.
-n FastPath
Identifies that the FastPath is the name of a selector.
-o PathName
Specifies a directory PathName of an alternate repository for SMIT objects. The default directory is /etc/objrepos.
-s PathName
Redirects the smit.script file to the specified PathName file.
-t
Records detailed trace information in the smit.log file.
-v
Records the command strings for intermediate and target task command run by SMIT, and also records their output in the smit.log file.
-x
Does not run any SMIT commands, but still logs them for later execution. This feature is very useful for building up a script file for later use.
-X
Does not run any commands.

Examples of Use of SMIT

Some examples using the smit command follow:

  1. To display the main menu in the overall system management hierarchy, use the smit command.
  2. To change the characteristics of a user, enter: smit chuser.

    This command is an example using a FastPath parameter. The smit command followed by the FastPath parameter chuser brings you directly to the menu Change User Attributes, which guides you through changing the characteristics of a user.

  3. To make the smit.script file executable for duplicate configuration, enter:
    chmod +x smit.script
    
    Then, to duplicate your configuration, enter: smit.script.

    The smit.script file can be edited to create slight variations in the configuration commands, or to use only subsets of commands. Save smit.script file to a different file name if you want to use it later for any purpose.


    **** NOTE: **** SMIT runs commands under the Korn shell (/usr/bin/ksh). Some command strings in the smit.script file may require this environment to run correctly. You can add the line:
    #!/bin/ksh
    
    at the top of the smit.script file before you run it, to force the Korn Shell environment during the execution of the script.

Files Created by SMIT

SMIT creates two files: the smit.script file and the smit.log file.

Invoking the smit command with the -s PathName flag saves the smit.script file in the file specified by the PathName parameter. If the -s flag is not specified, the script information is saved in the $HOME/smit.script file.

Invoking the smit command with the -l PathName flag saves the smit.log file in the file specified by the PathName parameter. If the -l flag is not specified, the log information is recorded in the $HOME/smit.log file.

You must have write permission on the directory in which you have requested the smit files to be written or the smit.script file and smit.log file are not created. You must also have write permission on both smit.script and smit.log files or these files aren't updated.

SMIT does not overwrite the smit.log file or the smit.script file. These files are appended when possible.

The smit.script file automatically records the commands with the command flags and parameters used. The smit.script file can be used as an executable shell script to duplicate system configuration.
SMIT creates the smit.log file, which contains additional detailed information that can be used by programmers in extending the SMIT system. It also contains the value of the different FastPath parameters that you can use to directly access the menus you have selected in SMIT, and the title of these associated menus. At last, it contains the output screens of SMIT. It can be very interesting to look at this file when an installation through SMIT has failed, in order to find the accurate reason of the failure, if you just didn't notice it at installation time.

SMIT Fastpath

The smit command displays the top level of the overall System Management hierarchy if you do not use the FastPath parameter. To enter the menu at lower levels, use the FastPath parameter. All commands run by SMIT can be used as FastPaths. The FastPath parameter will assist you as you become familiar with the commands. For example, you can enter: smit chuser to go directly to the dialogue from which you can change user characteristics.

At any time you can type the Image key (F8 function key in SMIT) to know the current FastPath of the current menu in SMIT. You can also look at the smit.log file that contains the log of the FastPath parameters corresponding to the different menus of SMIT you went through.

Files Needed by SMIT

SMIT requires access to the following files:
sm_menu_opt ODM database
sm_name_hdr ODM database
sm_cmd_hdr ODM database
sm_cmd_opt ODM database
smit.log SMIT log file
smit.script SMIT script file
/usr/lpp/info/$LANG InfoExplorer
/usr/lpp/msg/$LANG/smit.cat Message Catalog


**** NOTE: **** If any of these files are corrupt or exist on an NFS server and that server goes down, SMIT may hang.

SMIT and Object Data Manager (ODM)

The commands generated by SMIT work with the ODM database. Every time the Enter key or a function key is pressed, SMIT looks into ODM to search information or to update information for all tasks. Via SMIT, ODM stores and maintains system data as objects with associated characteristics.

The four following files are ODM database files that contain information about menus and commands SMIT uses for System Management tasks:
sm_menu_opt (SMIT Menu) Object Class
sm_name_hdr (SMIT Selection Header) Object Class
sm_cmd_hdr (SMIT Dialog Header) Object Class
sm_cmd_opt (SMIT Dialog/Selector Command) Option Object Class
SMIT builds these commands/menus as needed from this database, therefore, menus may look slightly different based upon how you accessed the menu or based upon what products are installed on the machine. It means that the installation of a specific product may bring new menus in SMIT. An update may also modify some SMIT menus.

The user can customize the appearance of all types of screens. See the types of the screen in Elements of SMIT. The user also can add functionality by adding new instances in the ODM. It can be useful to add your application in the SMIT menus.

Publications

To know more about the use of SMIT you can refer to the publications: AIX General Concepts and Procedures for RISC System/6000 and Getting Started: Using IBM RISC System/6000.