Operating System - HP-UX
1748242 Members
4133 Online
108760 Solutions
New Discussion юеВ

Re: script to run during start-up

 
SOLVED
Go to solution
Shukor
Frequent Advisor

script to run during start-up

Hi Experts,

OS: 11i v3 (2 clustered machines)

Actually, I want below script will run during server start-up.
#############################################
#more /home/oracle/Performance/run
/opt/java6/bin/java -jar SystemPerformance.jar false true > /dev/null &
#############################################

Please advise me how to do that?

Thanks in-advance.
6 REPLIES 6
Johnson Punniyalingam
Honored Contributor

Re: script to run during start-up

soft link above script , place under rc3.d

(S-> capital StartScript,XXX

[/sbin/rc3.d] # touch SXXXPerfjava

[/sbin/rc3.d] # ln -s {target-filename} {symbolic-filename}


Example :-

lrwxr-xr-x 1 root sys 19 May 9 2009 S920OVCtrl -> /sbin/init.d/OVCtrl
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: script to run during start-up

if above script if you have (OS: 11i v3 (2 clustered machines))

also it would better to place under "Cluster .pkg,file"

Problems are common to all, but attitude makes the difference
Shukor
Frequent Advisor

Re: script to run during start-up

Johnson,

so my steps should be like this right?

at cd /sbin/rc3.d
1. #touch S123Perfjava
2. #ln -s /home/oracle/Performance/run S123Perfjava

done. Ok?

Thanks Johnson.
Dennis Handly
Acclaimed Contributor
Solution

Re: script to run during start-up

>Johnson: soft link above script, place under rc3.d

You must not use the above script directly. The above fragment should be inserted into a copy of the standard rc(1m) template: /sbin/init.d/template

Note that the rc(1m) scripts have 4 possible parm values:
start_msg stop_msg start stop

Shukor
Frequent Advisor

Re: script to run during start-up

Hi Johnson & Dennis,

So, what is the best practise?

Thanks alot.
Johnson Punniyalingam
Honored Contributor

Re: script to run during start-up

Many Thanks for >>Dennis for correcting me :)

Hi shukur,

startup scripts need to follow the paradigm described in this (still valid whitepatper):

http://www.docs.hp.com/en/934/startup.pdf

...or in the manpages for 'rc(1M)':

http://www.docs.hp.com/en/B3921-60631/rc.1M.html

Use the '/sbin/init.d/template' file as the template to begin building *your* script
Problems are common to all, but attitude makes the difference