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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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. |
| |||
| 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 |
| |||
| > 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 |
| |||
| 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 |
| ||||
| 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 |
| Thread Tools | |
| Display Modes | |
|
|