2014년 2월 26일 수요일

HP-UX runlevel에 관하여

Run level 확인

root@sanfran   [/root]
# who -r
   .       run-level 3  Feb 25 11:48    3    0    S

run level 변경 

root@sanfran   [/root]
# init 2

root@sanfran   [/root]
#
INIT: New run level: 2

/sbin/auto_parms: DHCP access is disabled (see /etc/auto_parms.log)


logout root

     Transition to run-level 2 in progress
     _____________________________________

Transition to run-level 2 is complete.


Value of TERM has been set to "vt100".
WARNING:  YOU ARE SUPERUSER !!


아래 서비스가 run level2에서는 없다.
root@sanfran   [/root]
# ps -ef | grep dtrc

run level3 으로 가서 확인해보자
root@sanfran   [/root]
# init 3

root@sanfran   [/root]
#
INIT: New run level: 3

/sbin/auto_parms: DHCP access is disabled (see /etc/auto_parms.log)

logout root

     Transition to run-level 3 in progress
     _____________________________________
Transition to run-level 3 is complete.

Value of TERM has been set to "vt100".
WARNING:  YOU ARE SUPERUSER !!


root@sanfran   [/root]
# ps -ef | grep dtrc
    root 13328     1  0 10:03:14 ?         0:00 /sbin/sh /usr/dt/bin/dtrc

위와 같이 올라가 있는 서비스가 다름을 알 수 있다.

Runlevel(실행수준) 0~3 # who –r
                           # init
Run level 0 (=halt state)
-OS 모든 프로세스가 종료된 상태
-init 0 # shutdown –hy 0
-power on

Run level s (=single user mode)
-안전모드
-장애처리가 목적 최소한의 자원으로 부팅만!!
-/,/stand 만 마운트
-로그인과정 생략 à root passwd 분실

Run level 1(=single user mode)
-파일시스템 마운트(ß----/etc/fstab)
-hostname 설정

Run level 2(=multi user mode)
-network 설정(ip/netmask/gateway/dns)



버퍼에 내용을 디스크에 쓰기 (2~3회 실행 한번에 70%정도 수행하기 때문)
root@sanfran   [/root]
# sync

현제 접속 상태
root@sanfran   [/root]
# tty
/dev/console

runlevel 다르게 부팅하기

Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Seconds left till autoboot -  10
   Type 'help' for help

HPUX> boot vmunix –is (is or i1 or i2 or i3로 하면된다.)
INIT: Overriding default level with level 's'

INIT: SINGLE USER MODE


INIT: Running /sbin/sh

댓글 없음:

댓글 쓰기