smit 명령어 (AIX 5.3·6.1)
https://archive.horanglab.com/posts/aix-cmd-smit
핵심 정리
- 시스템 관리 메뉴 도구 SMIT를 실행합니다. 메뉴와 대화 상자에서 고른 대로 명령을 만들어 실행합니다.
- 그래픽 환경(X)이 있으면 창(Motif) 화면, 없으면 텍스트(Curses) 화면으로 뜹니다. 텍스트 화면을 강제하려면
smit -C나smitty를 씁니다. smit 빠른경로로 원하는 화면에 바로 갑니다(예:smit chuser,smit mktcpip,smit lvm).- 실행한 명령은
$HOME/smit.script에, 자세한 기록은$HOME/smit.log에 남습니다.smit.script를 고쳐 같은 구성을 다른 시스템에 되풀이할 수 있습니다. - 대화 상자에서 F6을 누르면 실행될 명령을 미리 볼 수 있어, 명령을 배우는 데도 쓸모 있습니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (두 버전의 내용이 거의 같음) |
| 원문 | IBM Commands Reference — 5.3 Volume 5, 6.1 Volume 5 |
| 파일 | /usr/bin/smit, /etc/objrepos, $HOME/smit.log, $HOME/smit.script |
| 관련 명령어 | smitty, chmod, chsec, lssec, smitacl.user |
목적
시스템 관리를 합니다.
영어 원문
Performs system management.
구문
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 ]
설명
smit 명령은 시스템 관리 인터페이스 도구(SMIT, System Management Interface Tool)를 실행합니다. SMIT는 시스템 관리 작업을 쉽게 하도록 만든 대화형 인터페이스 응용 프로그램입니다. 대화 상자로 이어지는 메뉴 계층을 보여 주고, 사용자가 고른 대로 명령을 만들어 실행합니다. SMIT가 명령을 실행하므로, 그 명령을 실행할 권한이 있어야 합니다.
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로 쓸 수 있습니다. 예를 들어 smit chuser를 입력하면 사용자 특성을 바꾸는 대화 상자로 바로 갑니다.
참고: 사용자가 SMIT 화면에 접근하는 것은 smitacl.user나 smitacl.group으로 제어할 수 있습니다.
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 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:
sm_menu_opt— SMIT databasesm_name_hdr— SMIT databasesm_cmd_hdr— SMIT databasesm_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 |
ASCII(Curses라고도 함) 인터페이스로 SMIT를 시작합니다. |
-M |
창(Motif라고도 함) 인터페이스로 SMIT를 시작합니다. |
-p Entity/ValueString |
창 버전에만 해당. 이름 선택기와 대화 상자를 명령줄에서 채우고, 여러 개체를 한 번에 다룰 수 있게 합니다. 기본 구분자 쉼표와 세미콜론은 환경 변수 ENTITY_SEP, VALUE_SEP로 바꿉니다. 형식은 "Entity1:Val1,Val2... ; Entity2:Val1,Val2... ; ..."나 "Val1,Val2... ; Val1,Val2... ; ..."입니다. |
-r RunMode |
창 버전에만 해당. msmit를 실행할 모드. 1: 출력 창에서 done을 누르면 끝냄. 2: 대화 상자에서 ok를 누르면 끝내고 대화 상자 옵션을 출력, 명령은 실행하지 않음. 3: 조용히 실행해 대화 상자 옵션을 출력, 명령은 실행하지 않음. 4: 대화 상자에서 ok를 누르면 끝내고 명령을 출력, 명령은 실행하지 않음. |
-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 an ASCII (also called Curses) interface.-D— Sets the debug mode; sets-tand-vflags.-dFastPath — 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.-lFile — Redirects the smit.log file to the specified File.-M— Starts SMIT using a windows (also called Motif) interface.-mFastPath — Identifies that the FastPath is the name of a menu.-nFastPath — Identifies that the FastPath is the name of a selector.-oPathName — Specifies a directory PathName of an alternate repository for SMIT objects. The default directory is /etc/objrepos.-pEntity/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 variablesENTITY_SEPandVALUE_SEPto 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... ; ..."-rRunMode — 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.-sFile — 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 anycommand_to_execute, but still logs them for later execution.-X— Does not run anycommand_to_discover,command_to_list,command_toclassify orcommand_to_execute.
예제
- 시스템 관리 전체 계층의 주 메뉴를 봅니다.
smit
- 사용자 특성을 바꿉니다.
chuser는 FastPath의 예로,Change User Attributes대화 상자로 바로 가서 사용자 특성 바꾸기를 안내합니다.
smit chuser
- 같은 구성을 다시 만들 수 있게
smit.script를 실행 파일로 만들고 실행합니다.
chmod +x smit.script
./smit.script
smit.script를 고쳐 구성 명령을 조금 바꾸거나 일부만 쓸 수 있습니다. SMIT가 이 파일을 계속 덧붙이지 않도록 이름을 바꾸거나 복사해 둡니다.
참고: SMIT는 Korn 셸(/usr/bin/ksh)에서 명령을 실행합니다. smit.script의 일부 명령은 이 환경이 있어야 제대로 실행됩니다.
자주 쓰는 FastPath:
| FastPath | 화면 |
|---|---|
smit user |
사용자 관리 |
smit mktcpip |
TCP/IP 최소 구성 |
smit tcpip |
TCP/IP 전체 메뉴 |
smit lvm |
논리 볼륨 관리자 |
smit jfs2 |
JFS2 파일 시스템 |
smit install_latest |
소프트웨어 설치 |
smit errpt |
오류 보고서 |
smit chgsys |
운영 체제 특성 바꾸기 |
대화 상자에서 F6(또는 Esc 6)을 누르면 SMIT가 실행할 명령을 미리 볼 수 있습니다.
영어 원문
- To display the main menu in the overall system management hierarchy, enter:
smit
- 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.
- 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/smit |
smit 명령 |
/etc/objrepos |
SMIT 데이터베이스의 기본 디렉터리 |
smit.log |
세션의 자세한 정보(타임스탬프 포함) |
smit.script |
SMIT가 실행한 대상 작업 명령만(타임스탬프 포함) |
영어 원문
- /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.
Related information:
- chmod command
- chsec command
- lssec command
- smitacl.user command
System Management Interface Tool (SMIT)
리눅스(GNU)와 다른 점
리눅스에는 SMIT 같은 통합 관리 메뉴가 표준으로 없습니다. 배포판마다 비슷한 도구가 있어 RHEL 계열은 nmtui(네트워크)와 웹 콘솔 Cockpit을, SUSE는 yast를, Debian 계열은 dpkg-reconfigure를 씁니다. SMIT의 smit.script처럼 실행한 명령을 자동으로 남기는 기능은 셸 기록(history)이나 script 명령으로 대신합니다.