1830898 Members
3115 Online
110017 Solutions
New Discussion

Start init file in hpux

 
SOLVED
Go to solution
Achilles_2
Regular Advisor

Start init file in hpux

Dear all,

I don't know that I didn't run my some processes in rc4.d when next boot. What is the difference between rc3.d and rc4.d. Because it worked if the files were in rc3.d. Also when I shutdown the server, it couldn't show such processes termination in the screen.
Thanks for your help.
16 REPLIES 16
Arunvijai_4
Honored Contributor

Re: Start init file in hpux

Hello,

Runlevel 3 is Multiuser with NFS.

Runlevel 4 is custom.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: Start init file in hpux

3 Export filesystems and start other system processes. In
this state NFS filesystems are often exported, as mayhe
be required for an NFS server.system will be kernelf
daemons started directly by the HP-UX kernel, daemon1M)
4 Activate graphical presentation managers and start them
other system processes. on the system console, and anyy
processes started by the system administrator.normals

See init man page for run level information.


See /etc/rc.log for startup scripts stop and start related informations.


--
Muthu
Easy to suggest when don't know about the problem!
dipesh_2
Regular Advisor

Re: Start init file in hpux

init level 3 is used for multiuser, multitasking and for networking whereas init level 4 is custom base
Peter Godron
Honored Contributor
Solution

Re: Start init file in hpux

Achilles,
are you sure your files are being run at all?

Check the /etc/inittab file for the line:
init:3:initdefault:
and change it to:
init:4:initdefault:

This will mean the startup/shutdown scripts in rc4.d will also be looked at!
Arunvijai_4
Honored Contributor

Re: Start init file in hpux

Hello,


Runlevel3 Export filesystems and start other system processes. In this state NFS filesystems are often exported, as may
be required for an NFS server.

Runlevel 4 Activate graphical presentation managers and start other system processes.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Achilles_2
Regular Advisor

Re: Start init file in hpux

It is better to put my own init file in the rc4.d directoy, isn't?

By the way, what's the usage of rc2.d?
Peter Godron
Honored Contributor

Re: Start init file in hpux

Achilles,
from man init:

0 Shut down HP-UX.

S|s Use for system administration (also known as "single-
user state"). When booting into run level S at powerup,
the only access to the system is through a shell
spawned at the system console as the root user. The
only processes running on the system will be kernel
daemons started directly by the HP-UX kernel, daemon
processes started from entries of type sysinit in
/etc/inittab, the shell on the system console, and any
processes started by the system administrator.
Administration operations that require the system to be
in a quiescent state (such as the fsck(1M) operation to
repair a file system) should be run in this state.
Transitioning into run level S from a higher run level
does not terminate other system activity and does not
result in a "single-user state"; this operation should
not be done.

1 Start a subset of essential system processes. This
state can also be used to perform system administration
tasks.

2 Start most system daemons and login processes. This
state is often called the "multi-user state". Login
processes either at local terminals or over the network
are possible.

3 Export filesystems and start other system processes. In
this state NFS filesystems are often exported, as may
be required for an NFS server.

4 Activate graphical presentation managers and start
other system processes.

5-6 These states are available for user-defined operations.
Arunvijai_4
Honored Contributor

Re: Start init file in hpux

Hi,

It is better to put my own init file in the rc4.d directoy, isn't?

It depends on how you start.

By the way, what's the usage of rc2.d?


Run level 2 Start most system daemons and login processes. This state is often called the "multi-user state". Login processes either at local terminals or over the network are possible.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: Start init file in hpux

Run Level:

init 0 - shutdown
init 1 - single user mode
init 2 - multi user and login process (needed) startup
init 3 - nfs + init 2
init 4 - custom based
init 5 - GUI + other function
init 6 - restart

--
Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: Start init file in hpux

It is always GOOD to refer man page first. See as,

# man init

first.

--
Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Start init file in hpux

Hello,

http://docs.hp.com/en/B2355-90691/init.1M.html

_Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Yogeeraj_1
Honored Contributor

Re: Start init file in hpux

hi,

note that the HP-UX default runlevel is 3

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Start init file in hpux

also, you can query the current run-level of your system by typing:

who -r

e.g.
# who -r
. run-level 3 Oct 8 05:32 3 0 S


Which may also indicate that run-level 4 processes were never executed.


hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Start init file in hpux

hi again,

see also this interesting article:
http://hp.cso.uiuc.edu/projects/seminars/07-21-97.html

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Start init file in hpux

this complete document is about run-levels in different unix systems.

very interesting.

hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Start init file in hpux

oops! the url:
http://www.phildev.net/runlevels.html
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)