refresh 명령어 (AIX 5.3·6.1)
https://archive.horanglab.com/posts/aix-cmd-refresh
핵심 정리
- SRC를 거쳐 하위 시스템(데몬)에 새로 고침 요청을 보냅니다. 보통 설정 파일을 다시 읽게 할 때 씁니다(예:
/etc/inetd.conf,/etc/syslog.conf를 고친 뒤). refresh -s inetd(하나),refresh -g tcpip(그룹),refresh -p PID(특정 인스턴스).- 새로 고침에서 실제로 무엇을 하는지는 하위 시스템마다 다릅니다.
- 통신 방법이 신호(signal)인 하위 시스템에는 쓸 수 없습니다. 그런 데몬은
stopsrc·startsrc로 다시 시작하거나kill -HUP을 씁니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1 문서에 RBAC 보안 안내가 더해짐. 플래그는 같음) |
| 원문 | IBM Commands Reference — 5.3 Volume 4, 6.1 Volume 4 |
| 파일 | /usr/bin/refresh, /etc/objrepos/SRCsubsys |
| 관련 명령어 | startsrc, stopsrc, lssrc, srcmstr |
목적
하위 시스템이나 하위 시스템 그룹의 새로 고침을 요청합니다.
영어 원문
Requests a refresh of a subsystem or group of subsystems.
구문
refresh [ -h Host ] { -g Group | -p SubsystemPID | -s Subsystem }
설명
refresh 명령은 시스템 자원 제어기(SRC)에 하위 시스템 새로 고침 요청을 보내고, SRC는 이를 하위 시스템에 전달합니다. 새로 고침에서 하는 일은 하위 시스템에 따라 다릅니다.
참고: 하위 시스템의 통신 방법이 신호면 refresh는 실패합니다.
영어 원문
The refresh command sends the System Resource Controller a subsystem refresh request that is forwarded to the subsystem. The refresh action is subsystem-dependent.
Note: The refresh command is unsuccessful if the communication method for the subsystems is signals.
플래그
| 플래그 | 설명 |
|---|---|
-g Group |
새로 고칠 하위 시스템 그룹. 하위 시스템 객체 클래스에 없는 그룹이면 실패합니다. |
-h Host |
이 동작을 요청할 원격 호스트. 로컬 사용자는 root로 실행해야 합니다. 원격 시스템은 원격 SRC 요청을 받도록 구성되어 있어야 합니다. 곧 srcmstr 데몬(/etc/inittab 참고)이 -r 플래그로 시작되어 있고, /etc/hosts.equiv나 .rhosts가 원격 요청을 허용해야 합니다. |
-p SubsystemPID |
새로 고칠 하위 시스템의 특정 인스턴스. |
-s Subsystem |
새로 고칠 하위 시스템. 실제 이름이나 동의어 이름을 씁니다. 하위 시스템 객체 클래스에 없으면 실패합니다. |
영어 원문
-gGroup — Specifies a group of subsystems to refresh. The refresh command is unsuccessful if the Group name is not contained in the subsystem object class.-hHost — Specifies the foreign Host machine on which this refresh action is requested. The local user must be running as "root". The remote system must be configured to accept remote System Resource Controller requests. That is, the srcmstr daemon (see /etc/inittab) must be started with the-rflag and the /etc/hosts.equiv or .rhosts file must be configured to allow remote requests.-pSubsystemPID — Specifies a particular instance of the subsystem to refresh.-sSubsystem — Specifies a subsystem to refresh. The Subsystem name can be the actual subsystem name or the synonym name for the subsystem. The refresh command is unsuccessful if Subsystem name is not contained in the subsystem object class.
보안
RBAC 사용자와 Trusted AIX 사용자는 주의하세요. 이 명령은 특권 작업을 할 수 있으며, 특권 작업은 특권 사용자만 할 수 있습니다. 특권과 권한 목록은 lssecattr 명령이나 getcmdattr 하위 명령으로 봅니다(6.1 문서에만 있음).
영어 원문
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
예제
| 명령 | 하는 일 |
|---|---|
refresh -g tcpip |
tcpip 같은 그룹을 새로 고침 |
refresh -s xntpd |
xntpd 같은 하위 시스템을 새로 고침 |
자주 쓰는 형태:
vi /etc/inetd.conf && refresh -s inetd # inetd 서비스 목록 다시 읽기
vi /etc/syslog.conf && refresh -s syslogd # syslog 설정 다시 읽기
lssrc -a | grep -i inoperative # 새로 고침 뒤 멈춘 것이 없는지 확인
영어 원문
- To refresh the a group, like
tcpip, enter:
refresh -g tcpip
- To refresh a subsystem, like
xntpd, enter:
refresh -s xntpd
파일
| 파일 | 설명 |
|---|---|
/etc/objrepos/SRCsubsys |
SRC 하위 시스템 구성 객체 클래스 |
/etc/services |
인터넷 서비스가 쓰는 소켓과 프로토콜 정의 |
/dev/SRC |
AF_UNIX 소켓 파일 |
/dev/.SRC-unix |
임시 소켓 파일의 위치 |
영어 원문
- /etc/objrepos/SRCsubsys — Specifies the SRC Subsystem Configuration Object Class.
- /etc/services — Defines the sockets and protocols used for Internet services.
- /dev/SRC — Specifies the
AF_UNIXsocket file. - /dev/.SRC-unix — Specifies the location for temporary socket files.
Related information:
- startsrc command
- stopsrc command
- System Resource Controller
리눅스(GNU)와 다른 점
리눅스에서 SRC에 해당하는 것은 systemd입니다. lssrc -a는 systemctl list-units --type=service, lssrc -s 이름은 systemctl status 이름, startsrc -s·stopsrc -s는 systemctl start·stop, refresh -s는 systemctl reload에 가깝습니다. 하위 시스템 그룹(-g tcpip)은 systemd의 target이나 여러 단위를 한 번에 지정하는 것으로 대신합니다.