smit Command

Purpose

Performs system management.

Syntax

smit [ -C | -M ] [ -D ] [ -f ] [ -h ] [ -l File ] [ -o PathName ] [ -p Entity/ValueString ] [ -r RunMode ] [ -s File ] [ -t ] [ -v ] [ [ -m | -n | -d ] FastPath ] [ -X ] [ -x ]

Description

The smit command invokes the System Management Interface Tool (SMIT). SMIT is an interactive interface application designed to simplify system management tasks. The smit command displays a hierarchy of menus that can lead to interactive dialogues. SMIT builds and runs commands as directed by the user. Because SMIT runs commands, you need the authority to execute the commands that SMIT runs.

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 for the directory in which you have requested the smit file to be written or the smit.script file and smit.log file are not created. SMIT does not overwrite the smit.log file or the smit.script file. The 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. The smit.log file is affected by the -D, -l, -t, and -v flags.

The smit command takes you to the top level of the menu 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 dialog from which you can change user characteristics.
Note: User access to SMIT panels may be controlled with the smitacl.user or smitacl.group commands.

SMIT requires access to the following files:

Item Description
sm_menu_opt SMIT database
sm_name_hdr SMIT database
sm_cmd_hdr SMIT database
sm_cmd_opt SMIT database
smit.log SMIT log file
smit.script SMIT script file
/usr/lpp/msg/.../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 fail to respond.

Flags

Item Description
-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 File Redirects the smit.log file to the specified 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.
-p Entity/ValueString This flag only applies to the smit windows version. Allows nameselects and dialogs to be filled in from the command line. Also allows you to operate on multiple entities simultaneously. You can set the environment variables ENTITY_SEP and VALUE_SEP to override the default comma and semicolon separators.

You can enter Entity/ValueString in any of the following formats:

"Entity1:Val1,Val2... ; Entity2:Val1,Val2... ; ..."

or

"Val1,Val2... ; Val1,Val2... ; ..."

-r RunMode This flag only applies to smit windows version. Specifies the mode to run msmit in.

You can enter the following values for RunMode:

1
Exit msmit when done is clicked in the output window.
2
Exit msmit when ok is clicked in a dialog. Print the dialog options upon exit. Do not run the command.
3
Run msmit silently, print the dialog options. Do not run the command.
4
Exit msmit when ok is clicked in the dialog. Print the commands upon exit. Do not run the command.
-s File Redirects the smit.script file to the specified File.
-t Records detailed trace information in the smit.log file.
-v Records the command strings for intermediate and target task commands run by SMIT, and also records their output in the smit.log file.
-x Does not run any command_to_execute, but still logs them for later execution.
-X Does not run any command_to_discover, command_to_list, command_to classify or command_to_execute.

Examples

  1. To display the main menu in the overall system management hierarchy, enter:
    smit 
  2. To change the characteristics of a user, enter:
    smit chuser
    The chuser command is an example of a FastPath parameter. The smit command and the FastPath parameter chuser takes you directly to the dialog, 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 the commands. The smit.script file should be renamed or copied to prevent SMIT from modifying it.
    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.

Files

Item Description
/usr/bin/smit Contains the smit command.
/etc/objrepos Specifies the default directory for the SMIT database.
smit.log Specifies detailed information of your session, with time stamps.
smit.script Specifies only the target task commands run by SMIT, with time stamps.