smitty 명령어 (AIX 5.3·6.1)

핵심 정리

  • SMIT를 텍스트(Curses) 화면으로 실행합니다. smit -C와 같으며, 원격 터미널(ssh, telnet)에서 쓰는 SMIT는 대부분 이것입니다.
  • smitty 빠른경로로 원하는 화면에 바로 갑니다(예: smitty user, smitty mktcpip, smitty lvm, smitty install_latest).
  • 화면 키: Enter(실행), F3·Esc 3(뒤로), F4·Esc 4(목록), F6·Esc 6(실행할 명령 보기), F10·Esc 0(끝내기). 터미널에서 F키가 안 되면 Esc+숫자를 씁니다.
  • 실행한 명령은 $HOME/smit.script, 자세한 기록은 $HOME/smit.log에 남습니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 smitty chuser는 로컬 사용자에만 쓰라는 참고가 더해짐)
원문 IBM Commands Reference — 5.3 Volume 5, 6.1 Volume 5
파일 /usr/bin/smitty, /etc/objrepos, $HOME/smit.log, $HOME/smit.script
관련 명령어 smit, chmod

목적

Curses 기반 텍스트 인터페이스로 시스템 관리를 합니다.

영어 원문

Provides a Curses-based text interface to perform system management.

구문

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

설명

smitty 명령은 시스템 관리 인터페이스 도구(SMIT, System Management Interface Tool)를 실행합니다. SMIT는 시스템 관리 작업을 쉽게 하도록 만든 대화형 인터페이스 응용 프로그램입니다. 대화 상자로 이어지는 메뉴 계층을 보여 주고, 사용자가 고른 대로 명령을 만들어 실행합니다. SMIT가 명령을 실행하므로, 그 명령을 실행할 권한이 있어야 합니다.

참고: smitty는 smit -C와 같습니다.

SMIT는 smit.script와 smit.log 두 파일을 만듭니다. -s PathName을 주면 smit.script를 그 파일에, 주지 않으면 $HOME/smit.script에 저장합니다. -l PathName을 주면 smit.log를 그 파일에, 주지 않으면 $HOME/smit.log에 기록합니다. 파일을 쓸 디렉터리에 쓰기 권한이 없으면 두 파일은 만들어지지 않습니다. SMIT는 두 파일을 덮어쓰지 않고 되도록 뒤에 덧붙입니다.

smit.script는 실행한 명령을 플래그와 매개변수까지 자동으로 기록합니다. 이 파일을 실행할 수 있는 셸 스크립트로 써서 같은 시스템 구성을 다시 만들 수 있습니다. smit.log에는 SMIT를 확장하는 프로그래머가 쓸 수 있는 자세한 정보가 담기며, -D, -l, -t, -v 플래그의 영향을 받습니다.

FastPath 매개변수 없이 실행하면 메뉴 계층의 맨 위로 갑니다. 더 아래 메뉴로 바로 가려면 FastPath를 씁니다. SMIT가 실행하는 명령은 모두 FastPath로 쓸 수 있습니다. 예를 들어 smitty chuser를 입력하면 사용자 특성을 바꾸는 대화 상자로 바로 갑니다.

SMIT는 다음 파일에 접근해야 합니다.

파일 뜻
sm_menu_opt, sm_name_hdr, sm_cmd_hdr, sm_cmd_opt SMIT 데이터베이스
smit.log SMIT 로그 파일
smit.script SMIT 스크립트 파일
/usr/lpp/msg/.../smit.cat 메시지 카탈로그

참고: 이 파일들이 망가졌거나, NFS 서버에 있는데 그 서버가 멈추면 SMIT가 응답하지 않을 수 있습니다.

영어 원문

The smitty command invokes the System Management Interface Tool (SMIT). SMIT is an interactive interface application designed to simplify system management tasks. The smitty 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.

Note: The smitty command is identical to smit -C.

SMIT creates two files, the smit.script file and the smit.log file. Invoking the smitty 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 smitty 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 files 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 smitty 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: smitty chuser to go directly to the dialog from which you can change user characteristics.

SMIT requires access to the following files:

  • 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.

플래그

플래그 설명
-C Curses 기반 텍스트 인터페이스로 SMIT를 시작합니다. smitty의 기본값입니다.
-D 디버그 모드. -t와 -v를 켭니다.
-d FastPath FastPath가 대화 상자(dialogue)의 이름임을 나타냅니다.
-f SMIT의 표준 입력과 표준 출력을 리디렉션할 수 있게 합니다.
-h 사용법을 보여 줍니다.
-l File smit.log를 File로 보냅니다.
-m FastPath FastPath가 메뉴의 이름임을 나타냅니다.
-n FastPath FastPath가 선택기(selector)의 이름임을 나타냅니다.
-o PathName SMIT 객체의 다른 저장소 디렉터리. 기본은 /etc/objrepos입니다.
-s File smit.script를 File로 보냅니다.
-t 자세한 추적 정보를 smit.log에 기록합니다.
-v SMIT가 실행한 중간·대상 작업 명령의 문자열과 그 출력을 smit.log에 기록합니다.
-x command_to_execute를 실행하지 않고 나중에 실행할 수 있게 기록만 합니다.
-X command_to_discover, command_to_list, command_to_classify, command_to_execute를 하나도 실행하지 않습니다.
영어 원문
  • -C — Starts SMIT using a Curses-based text interface. This is the default for the smitty command.
  • -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 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 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.

예제

  1. 시스템 관리 전체 계층의 주 메뉴를 봅니다.
bash
smitty
  1. 사용자 특성을 바꿉니다. chuser는 FastPath의 예로, Change User Attributes 대화 상자로 바로 가서 사용자 특성 바꾸기를 안내합니다.
bash
smitty chuser

참고(6.1): smitty chuser는 로컬 사용자를 바꿀 때만 씁니다.

  1. 같은 구성을 다시 만들 수 있게 smit.script를 실행 파일로 만들고 실행합니다.
bash
chmod +x smit.script
./smit.script

smit.script를 고쳐 구성 명령을 조금 바꾸거나 일부만 쓸 수 있습니다. SMIT가 이 파일을 계속 덧붙이지 않도록 이름을 바꾸거나 복사해 둡니다.

참고: SMIT는 Korn 셸(/usr/bin/ksh)에서 명령을 실행합니다. smit.script의 일부 명령은 이 환경이 있어야 제대로 실행됩니다.

자주 쓰는 FastPath:

FastPath 화면
smitty user 사용자 관리
smitty mktcpip TCP/IP 최소 구성
smitty tcpip TCP/IP 전체 메뉴
smitty lvm 논리 볼륨 관리자
smitty jfs2 JFS2 파일 시스템
smitty install_latest 소프트웨어 설치
smitty errpt 오류 보고서
smitty chgsys 운영 체제 특성 바꾸기

대화 상자에서 F6(또는 Esc 6)을 누르면 SMIT가 실행할 명령을 미리 볼 수 있습니다.

영어 원문
  1. To display the main menu in the overall system management hierarchy, enter:
smitty
  1. To change the characteristics of a user, enter:
smitty chuser

The chuser command is an example of a FastPath parameter. The smitty 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.

Note: The smitty chuser command should be used to modify only local users.

  1. 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.

파일

파일 설명
/usr/bin/smitty smitty 명령
/etc/objrepos SMIT 데이터베이스의 기본 디렉터리
영어 원문
  • /usr/bin/smitty — Contains the smitty 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.

Related information:

  • chmod command
  • System Management Interface Tool (SMIT)

리눅스(GNU)와 다른 점

리눅스에는 SMIT 같은 통합 관리 메뉴가 표준으로 없습니다. 배포판마다 비슷한 도구가 있어 RHEL 계열은 nmtui(네트워크)와 웹 콘솔 Cockpit을, SUSE는 yast를, Debian 계열은 dpkg-reconfigure를 씁니다. SMIT의 smit.script처럼 실행한 명령을 자동으로 남기는 기능은 셸 기록(history)이나 script 명령으로 대신합니다.