Unix Technical Forum

elementary questions about startup/shutdown scripts

This is a discussion on elementary questions about startup/shutdown scripts within the AIX Operating System forums, part of the Unix Operating Systems category; --> I lose track of the best way to do this as it changes on all the different flavours of ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 11:27 AM
Neil Truby
 
Posts: n/a
Default elementary questions about startup/shutdown scripts

I lose track of the best way to do this as it changes on all the different
flavours of UNIX and Linux:

This is AIX 53L.

I need to sop and restart my Informix database as I reboot my server. The
script to do so is trivial. But where to put it/them? /etc/rc.d/rc2.d and
rc3.d? Use mkitab?

Please advise.

Thx
Neil


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 11:27 AM
stolev@gmail.com
 
Posts: n/a
Default Re: elementary questions about startup/shutdown scripts


Neil Truby wrote:
> I lose track of the best way to do this as it changes on all the different
> flavours of UNIX and Linux:
>
> This is AIX 53L.
>
> I need to sop and restart my Informix database as I reboot my server. The
> script to do so is trivial. But where to put it/them? /etc/rc.d/rc2.d and
> rc3.d? Use mkitab?
>
> Please advise.
>
> Thx
> Neil

IBM recomendation is to use inittab to start different processes and
rc.shutdown for stoping them.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 11:27 AM
Jurjen Oskam
 
Posts: n/a
Default Re: elementary questions about startup/shutdown scripts

On 2006-09-17, stolev@gmail.com <stolev@gmail.com> wrote:

> IBM recomendation is to use inittab to start different processes and
> rc.shutdown for stoping them.


Hmm, I guess they'll remove the System Resource Controller in the next version
of AIX then...

--
Jurjen Oskam
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 11:27 AM
rmdashrsplat
 
Posts: n/a
Default Re: elementary questions about startup/shutdown scripts


> I need to sop and restart my Informix database as I reboot my server. The
> script to do so is trivial. But where to put it/them? /etc/rc.d/rc2.d and
> rc3.d? Use mkitab?


As I'm sure you have noticed, AIX provides a "garden variety" of
methods for implementing start and stop scripts. And given the vast
amount of options, arguably, there is no specific correct way of doing
it. Whatever you decide, you should definitely think about
establishing some sort of standard practice. This involves profiling
each startup script, looking at the properties, and then categorizing
it. You then have a trivial method of where to put all your start/stop
scripts.

We have a mixed environment of UNIX systems and tend to favor the
System V style of Start/Stop scripts as our standard. AIX's
implementation of SYS V start/stop is very weak, but nontheless you can
still make it work. All of our custom start/stop scripts we write
oursleves, go into /etc/rc.d/rc.2,3 etc. Caveat: While /etc/inittab
will control starting your /etc/rc.d/rc.X scripts based on run level,
it will not stop them in the same manner. The /usr/sbin/shutdown
script will do a blanket stop on all /etc/rc.d/rc.X scripts (ignoring
run level). This is a very different approach than other "real" SYS V
platforms.

We never put custom startup scripts directly into /etc/inittab. Most
of the services in inittab are there either becuase an installed
software product put them there, or they came as part of the AIX OS
installation. Not to say you shouldn't or may never need to, we just
haven't had the need.

In theory the system resource controller (SRC) could be used to
standardize every start/stop script you could ever have. I have yet to
see how doing so would justify the effort involved. In fact most
Sysadmins (that I know) who have had other plaform experience gaze upon
the ODMcentric SRC scratching their heads wondering "What does this
really buy me?" I tend to wonder the same thing sometimes.

Brent

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 11:27 AM
Wil Cooley
 
Posts: n/a
Default Re: elementary questions about startup/shutdown scripts

On Mon, 18 Sep 2006 07:04:31 +0000, Jurjen Oskam wrote:

> On 2006-09-17, stolev@gmail.com <stolev@gmail.com> wrote:
>
>> IBM recomendation is to use inittab to start different processes and
>> rc.shutdown for stoping them.

>
> Hmm, I guess they'll remove the System Resource Controller in the next version
> of AIX then...


Look at your inittab. It's mostly entries that run 'startsrc -s foo'.

Wil
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-05-2008, 11:32 AM
c00p
 
Posts: n/a
Default Re: elementary questions about startup/shutdown scripts

I've used both inittab and the Sys V methods. On the AIX platform I
prefer inittab/rc.shutdown, just because of some peculiar things that
the AIX rc script does. For one thing it always runs the kill scripts
before starting anything. Also I ran into a bug with the standard
"while read" loop where if any of the start scripts wrote to stdout it
would flush what was stored by read causing any subsequent startup
scripts to fail.

I had to change this for my rc scripts to all work right:
echo "${s_list}" | while read item
to this:
for item in `echo "${s_list}"`

Besides, you're using inittab regardless, so I don't really think it
matters. If you do have issues using the Sys V init method I recommend
you setup some logging for that run level:
l2:2:wait:/etc/rc.d/rc 2 2>&1 | alog -tboot > /dev/console

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:13 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com