- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Want to understand more about init process
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2010 01:19 PM
04-27-2010 01:19 PM
h1:3:respawn:/sbin/init.d/init.evmd run >/dev/null 2>&1 h2:3:respawn:/sbin/init.d/init.cssd fatal >/dev/null 2>&1 h3:3:respawn:/sbin/init.d/init.crsd run >/dev/null 2>&1
I have read the man pages for init and inittab. I understand the following line actually executes the files in /sbin/rc*.d, but it is not clear what determines the order of processing the lines in /etc/inittab.
sqnc::wait:/sbin/rc /dev/console 2>&1 # system init
The Oracle lines are currently close to the end of /etc/inittab. I tried moving them before the sqnc line, but that did not make any difference.
So, what I am wanting is to understand the order in which the lines in /etc/inittab are executed.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2010 01:35 PM
04-27-2010 01:35 PM
Re: Want to understand more about init process
This is an awful way for Oracle to be configured. It is bad systems administration practice.
Oracle startup scripts belong in /sbin/init.d/
Link to Oracle startup scripts can be created as follows:
cd /sbin/rc3.d
ln -s S900oracle
cd /sbin/rc2.d
ln -s K100oracle
This assumes Oracle doesn't ship with these toys already in place.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2010 01:41 PM
04-27-2010 01:41 PM
Re: Want to understand more about init process
Regardless, this is not helping me understand the init process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2010 01:51 PM
04-27-2010 01:51 PM
Re: Want to understand more about init process
When the 'init' daemon first transitions to run-level 3, the scripts you show are started by '/sbin/rc'. Since your 'inittab' specifies 'respawn', the 'init' daemon watches the process to make sure it continues to remain alive. Should the process die, 'init' will restart it without requiring a run-level transition again.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2010 02:06 PM
04-27-2010 02:06 PM
Re: Want to understand more about init process
It almost seems like something special is being done with the sqnc line - perhaps the lines in /etc/inittab are processed based on the action (wait or respawn or ...).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2010 03:35 PM
04-27-2010 03:35 PM
Re: Want to understand more about init process
Your 'h*' tokens are the IDs for the entries. The 'inittab' format is:
id:rstate:action:process
The 'rstate' (run-state) can assume the values 0-6 and 'a', 'b' or 'c'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2010 05:03 PM
04-27-2010 05:03 PM
Re: Want to understand more about init process
wait
When boot init enters the run level that matches the entry's rstate, start the process and wait for its termination. Any subsequent reads of the inittab file while boot init is in the same run level cause boot init to ignore this entry.
Thus the sqnc line causes intit to wait until /sbin/rc completes. This will occur at the end of processing all the startup scripts present in /sbin/rc3.d.
This should explain the behaviour you have observed. The ordering of lines in /etc/inittab is quite arbitary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2010 06:57 AM
04-28-2010 06:57 AM
Re: Want to understand more about init process
Jim - I am still trying to understand how init handles what it finds in /etc/inittab - I have read the man pages already - I do not understand exactly what you mean the order of the lines is arbitrary - there has to be some flow to how the lines are handled by init since we are talking about a computer program. That is really what I was hoping to find out here. I have found that it is clearly NOT sequential since it does NOT matter if I move the entries for Oracle in front of the "system init" line.
Does any one understand how init processes the lines in /etc/inittab beyond what is stated on the man page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2010 08:17 AM
04-28-2010 08:17 AM
Re: Want to understand more about init process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2010 12:35 PM
04-28-2010 12:35 PM
SolutionOnce the sysinit actions have been completed, the next step is the actions of type "boot" and "bootwait", again in the order they appear in the inittab file. These actions can expect the console to be basically functional, so more complex output is possible.
The difference between "boot" and "bootwait" would be that "boot" is left to run in the background while init goes forward in the boot process, and "bootwait" causes init to wait for the action to complete before it does anything else. The most important bootwait action is /sbin/bcheckrc, which runs the file system checks, changes the root filesystem to a read/write mode and mounts other filesystems.
At this point, init begins to transition the system to the runlevel defined by the initdefault entry (usually runlevel 3 in HP-UX). This means yet another pass through the inittab file. At this time, it runs the actions with types "once" or "respawn" - and only if the runlevel field is empty or matches the target runlevel.
When you moved your Oracle CRS inittab lines before the /sbin/rc line, the system probably attempted to execute them at this point. But because the system is still in a very "bare" state at this point, these scripts probably failed, possibly without leaving any trace to any logs.
(For further investigation: Read the init.evmd, init.cssd and init.crsd scripts, looking for any tests that would cause the scripts to terminate silently. Would the test conditions be true when the system has not yet completed booting up?)
The /sbin/rc line is the main workhorse of HP-UX startup and shutdown. It runs the /sbin/rc?.d scripts as appropriate. These scripts (and *only* them) have the additional benefit of logging their output to /etc/rc.log.
Once the main boot-up pass through the inittab file is complete, init settles to its normal run-time role of monitoring all its child processes. If one of init's children dies, and it was started by a "respawn" action, init will start that process again. (In modern Unix-style systems, there is usually a safety check that delays the restart if the process has failed for more than X times within the last minute or so.)
Because your Oracle CRS lines are using the "respawn" action type, they probably failed the first time if they were run before /sbin/rc (probably because the system was not yet functional enough for them), then succeeded after init restarted them on its first monitoring pass.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2010 08:58 AM
05-07-2010 08:58 AM
Re: Want to understand more about init process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2010 09:02 AM
05-07-2010 09:02 AM