Operating System - HP-UX
1832154 Members
3263 Online
110038 Solutions
New Discussion

How are applications started /stopped automaticly

 
Hans Kamann
Advisor

How are applications started /stopped automaticly

When starting the HPUX Server ( 10.20) a few applications are started automaticly like Oracle etc. If you shut down the server these applications are then shut down automaticly as well. In which files are the references to these apps stored ? As far as I know there are two types of files: for startup and for shutdown. We have a problem where one application ( AMASS) is not shut down correctly.

4 REPLIES 4
Mark Grant
Honored Contributor

Re: How are applications started /stopped automaticly

You need to look at the scripts /etc/rc* directories for the run level you normally run in (who -R). The files that begine with an S are used for startup and those that begin with a K are for shutdown. However, these files are only symbolic links to the actual scripts which reside in /sbin/init.d. It is in the /sbin/init.d scripts where you might need to do a bit of debugging.
Never preceed any demonstration with anything more predictive than "watch this"
Fabio Ettore
Honored Contributor

Re: How are applications started /stopped automaticly

Hi,

Mark is right!
You should create /sbin/init.d/yourscript with start/stop actions and /etc/rc.config.d/yourapplication. Also you should link /sbin/init.d/yourscript to /sbin/rcY.d/SXXXyourscript and /sbin/rcW.d/KXXXyourscript (Y and W stand for run level where your application Starts and Kill).
For troubleshooting from command line

# /sbin/init.d/yourscript start
# /sbin/init.d/yourscript stop

and see if messages appear.

About format of yourscript under /sbin/init.d you can see other scripts under the same directory. Then copy and customize /sbin/init.d/template file.

I hope this helps you.

Best regards,
Ettore
WISH? IMPROVEMENT!
Jean-Luc Oudart
Honored Contributor

Re: How are applications started /stopped automaticly

Also,

if you put your start script in /sbin/rc3.d,
your stop script should be in /sbin/rc2.d

SXXXyourscript (start)
KYYYyourscript (stop)
XXX + YYY = 1000

Regards,
Jean-Luc
fiat lux
Hans Kamann
Advisor

Re: How are applications started /stopped automaticly

Thanks a lot for your support. The wanted file was indeed in /sbin/rc1.d and named "K100amass ".

Cheers