탐색 링크 건너뛰기 | |
인쇄 보기 종료 | |
Oracle Solaris 11.1 시스템 부트 및 종료 Oracle Solaris 11.1 Information Library (한국어) |
다음 절차 및 예제는 shutdown 및 init 명령을 사용하여 시스템을 종료하는 방법에 대해 설명합니다.
halt 명령을 사용하는 것을 비롯하여 복구 용도로 시스템을 종료하는 것과 관련된 내용은 SPARC: 복구를 위한 시스템 중지 방법을 참조하십시오.
다중 사용자 시간 공유 시스템으로 사용되는 Oracle Solaris 시스템의 경우 시스템을 종료하기 전에 시스템에 로그인한 사용자가 있는지 확인해야 합니다. 이 경우 다음 절차를 사용하십시오.
$ who holly console May 7 07:30 kryten pts/0 May 7 07:35 (starlite) lister pts/1 May 7 07:40 (bluemidget)
첫번째 열의 데이터는 로그인한 사용자의 사용자 이름을 식별합니다.
두번째 열의 데이터는 로그인한 사용자의 단말기 회선을 식별합니다.
세번째 열의 데이터는 사용자가 로그인한 날짜 및 시간을 식별합니다.
네번째 열(있을 경우)의 데이터는 사용자가 원격 시스템에서 로그인한 경우 호스트 이름을 식별합니다.
# who
로그인한 모든 사용자의 목록이 표시됩니다.
# shutdown -iinit-state -ggrace-period -y
시스템을 기본값 S와 다른 초기 상태로 전환합니다. 0, 1, 2, 5 및 6을 선택할 수 있습니다.
실행 레벨 0 및 5는 시스템 종료를 위해 예약된 상태입니다. 실행 레벨 6은 시스템을 재부트합니다. 실행 레벨 2는 다중 사용자 작동 상태로 사용할 수 있습니다.
시스템이 종료되기까지 남은 시간(초)입니다. 기본값은 60초입니다.
개입 없이 시스템 종료를 계속합니다. 이 명령을 사용하지 않을 경우 60초 후에 종료 프로세스를 계속할지 묻는 프롬프트가 표시됩니다.
자세한 내용은 shutdown(1M) 매뉴얼 페이지를 참조하십시오.
Do you want to continue? (y or n): y
shutdown -y 명령을 사용한 경우 계속할지 묻는 프롬프트가 표시되지 않습니다.
Type Ctrl-d to proceed with normal startup, (or give root password for system maintenance): xxxxxx
|
예 3-1 shutdown 명령을 사용하여 시스템을 단일 사용자 상태(실행 레벨 S)로 전환
다음 예에서는 shutdown 명령을 사용하여 3분 이내에 시스템을 실행 레벨 S(단일 사용자 상태)로 설정합니다.
# who root console Apr 15 06:20 # shutdown -g180 -y Shutdown started. Fri Apr 15 06:20:45 MDT 2011 Broadcast Message from root (console) on portia Fri Apr 15 06:20:46... The system portia will be shut down in 3 minutes showmount: portia: RPC: Program not registered Broadcast Message from root (console) on portia Fri Apr 15 06:21:46... The system portia will be shut down in 2 minutes showmount: portia: RPC: Program not registered Broadcast Message from root (console) on portia Fri Apr 15 06:22:46... The system portia will be shut down in 1 minute showmount: portia: RPC: Program not registered Broadcast Message from root (console) on portia Fri Apr 15 06:23:16... The system portia will be shut down in 30 seconds showmount: portia: RPC: Program not registered Changing to init state s - please wait svc.startd: The system is coming down for administration. Please wait. root@portia:~# Apr 15 06:24:28 portia svc.startd[9]: Apr 15 06:24:28 portia syslogd: going down on signal 15 svc.startd: Killing user processes. Requesting System Maintenance Mode (See /lib/svc/share/README for more information.) SINGLE USER MODE Enter user name for system maintenance (control-d to bypass):xxxxxx #
예 3-2 shutdown 명령을 사용하여 시스템을 종료 상태(실행 레벨 0)로 설정
다음 예에서는 shutdown 명령을 사용하여 추가 확인 없이 5분 이내에 시스템을 실행 레벨 0으로 설정합니다.
# who root console Jun 17 12:39... userabc pts/4 Jun 17 12:39 (:0.0) # shutdown -i0 -g300 -y Shutdown started. Fri Apr 15 06:35:48 MDT 2011 Broadcast Message from root (console) on murky Fri Apr 15 06:35:48... The system pinkytusk will be shut down in 5 minutes showmount: murkey: RPC: Program not registered showmount: murkey: RPC: Program not registered Broadcast Message from root (console) on murkey Fri Apr 15 06:38:48... The system murkey will be shut down in 2 minutes showmount: murkey: RPC: Program not registered Broadcast Message from root (console) on murkey Fri Apr 15 06:39:48... The system murkey will be shut down in 1 minute showmount: murkey: RPC: Program not registered Broadcast Message from root (console) on murkey Fri Apr 15 06:40:18... The system murkey will be shut down in 30 seconds showmount: murkey: RPC: Program not registered Broadcast Message from root (console) on murkey Fri Apr 15 06:40:38... THE SYSTEM murkey IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged showmount: murkey: RPC: Program not registered Changing to init state 0 - please wait root@murkey:~# svc.startd: The system is coming down. Please wait. svc.startd: 122 system services are now being stopped. Apr 15 06:41:49 murkey svc.startd[9]: Apr 15 06:41:50 murkey syslogd: going down on signal 15 svc.startd: Killing user processes. Apr 15 06:41:57 The system is down. Shutdown took 69 seconds. syncing file systems... done Press any key to reboot. Resetting...
시스템을 실행 레벨 0으로 전환하여 모든 장치의 전원을 끄려면 시스템 장치 전원 끄기를 참조하십시오.
예 3-3 shutdown 명령을 사용하여 시스템을 다중 사용자 상태(실행 레벨 3)로 전환
다음 예에서는 shutdown 명령을 사용하여 2분 이내에 시스템을 실행 레벨 3으로 재부트합니다. 추가 확인이 필요하지 않습니다.
# who root console Jun 14 15:49 (:0) userabc pts/4 Jun 14 15:46 (:0.0) # shutdown -i6 -g120 -y Shutdown started. Fri Apr 15 06:46:50 MDT 2011 Broadcast Message from root (console) on venus Fri Apr 15 06:46:50... The system venus will be shut down in 2 minutes showmount: venus: RPC: Program not registered showmount: venus: RPC: Program not registered Broadcast Message from root (console) on venus Fri Apr 15 06:47:50... The system venus will be shut down in 1 minute showmount: venus: RPC: Program not registered showmount: venus: RPC: Program not registered Broadcast Message from root (console) on venus Fri Apr 15 06:48:20... The system venus will be shut down in 30 seconds showmount: venus: RPC: Program not registered Broadcast Message from root (console) on venus Fri Apr 15 06:48:40... THE SYSTEM venus IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged showmount: venus: RPC: Program not registered Changing to init state 6 - please wait root@venus:~# svc.startd: The system is coming down. Please wait. svc.startd: 123 system services are now being stopped. Apr 15 06:49:32 venus svc.startd[9]: Apr 15 06:49:32 venus syslogd: going down on signal 15 svc.startd: Killing user processes. Apr 15 06:49:40 The system is down. Shutdown took 50 seconds. syncing file systems... done rebooting... SunOS Release 5.11 Version 2010-12-10 64-bit Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved. Booting to milestone "milestone/single-user:default". Hostname: venus NIS domain name is solaris.example.com . . . venus console login:
참조
시스템 종료 이유에 관계없이 모든 파일 리소스를 사용할 수 있으며 사용자가 로그인할 수 있는 실행 레벨 3으로 돌아가고자 할 수 있습니다. 시스템을 다시 다중 사용자 상태로 설정하는 것과 관련된 지침은 4 장시스템 부트(작업)를 참조하십시오.
독립형 시스템을 종료해야 할 경우 이 절차를 사용하십시오.
# init 5
자세한 내용은 init(1M) 매뉴얼 페이지를 참조하십시오.
예 3-4 init 명령을 사용하여 시스템을 종료 상태(실행 레벨 0)로 설정
이 예에서는 init 명령을 사용하여 시스템의 전원을 안전하게 끌 수 있는 실행 레벨로 독립형 시스템을 설정합니다.
# init 0 # INIT: New run level: 0 The system is coming down. Please wait. . . . The system is down. syncing file systems... [11] [10] [3] done Press any key to reboot
참조
시스템 종료 이유에 관계없이 모든 파일 리소스를 사용할 수 있으며 사용자가 로그인할 수 있는 실행 레벨 3으로 돌아가고자 할 수 있습니다.