tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: DQS and reboot
@ 2001-01-23 10:49 Jan Minar
  0 siblings, 0 replies; only message in thread
From: Jan Minar @ 2001-01-23 10:49 UTC (permalink / raw)
  To: tru64-unix-managers

Hi all,
Thanks for your help and here is SUMMARY:

Mine question:
> Jan,
> 
> > I'm running DU V4.0E. I'm trying to find out how to convince qmaster and
> > dqs_execd to be restarted after rebooting of the system. I've tried
> > simply include it in the inittab but it didn't work
> > (dqs_execd:23:wait:/sbin/dqs_execd >  /dev/console 2>&1). Wouldn't be
> > better to include it in crontab?
> 
One of the answers:

> The normal facility for doing this is to use the runlevel scripts.  These
> scripts are run whenever the system alters it's runlevel -- like at
> startup and shutdown.*
> 
> * Shutdown is a special case for Tru64 prior to 5.x.  The "-r" and "-h"
> switches would simply kill all processes rather than running the
> runlevel trasition scripts.  With 5.x a "-s" flag was added to allow
> shutdown to run the scripts with the "-h" and "-r" switches.  A shutodwn
> without any switches has always used the scripts to bring the system
> down to single-user mode.
> 
> The design is a little odd before you get used to it.
> 
> /sbin/init.d
> 
>    This is the directory where the scripts are actually located.  The
>    normal design of the script it to have a case statment that handles
>    the command line paremeters passed to the script.  The scripts
>    should always handle "start" and "stop", but other commands like
>    "status" and "restart" are oftern implemented.
> 
>    This is where your script to start or stop DQS services should go.
>    When the script is run as "/sbin/init.d/scriptname start" it should
>    start the DQS services.  Conversely, when run with "stop" it should
>    stop the services.  Take a look at the scripts in /sbin/init.d for
>    ideas.
> 
> /sbin/rc0.d
> /sbin/rc2.d
> /sbin/rc3.d
> 
>    These are the runlevel directories.  These directories generally
>    contain symbolic links back to scripts in the /sbin/init.d
>    directory.  By convention, files in these directories begin with
>    either the letter "S" or the letter "K" and are followed by a
>    two-digit number and a filename.
> 
>    From the rc3.d manual page:
> 
>    In general, the system starts commands that begin with the letter
>    "S" and stops commands that begin with the letter "K." Commands that
>    begin with the letter "K" run only when the system is changing run
>    levels from a higher to a lower level.  Commands that begin with the
>    letter "S" run in all cases.  The numbering of commands in the
>    /sbin/rc3.d directory is important since the numbers are sorted and
>    the commands are run in ascending order.
> 
> Clear as mud right?
> 
> Here's what happens when you boot (simplified):
> 
> 1. The system boots.
> 
> 2. The root filesystem is mounted.
> 
> 3. Init is started.
> 
> 4. Init scans /etc/inittab, looking for the initdefault keyword.  This is
>    normally "3" on Tru64 systems.  If the entry is there, the init process
>    runs all tasks at that runlevel in the inittab file.  One of these
>    will be /sbin/rc3.  The runlevel is the second field in the inittab.
>    The runlevels are single digits, so "23" means to run for both "2"
>    and "3".
> 
> 5. The /sbin/rc3 script runs all of the programs in the /sbin/rc3.d
>    directory that start with "S" in accending order (S01file, S01file,
>    etc.).  The scripts are passed the parementer "start".
> 
> Shutdowns, using the runlevel scripts are similar:
> 
> 1. The super-user signals the system to shutdown (halt).
> 
> 2. Init runs all of the init level 0 stuff in the inittab file.
>    This includes the /sbin/rc.0 script.
> 
> 3. The /sbin/rc.0 script runs all of the scripts in /sbin/rc0.d
>    that start with "K", these scripts are passed the paremeter
>    "stop".  The script then runs all of the scripts in the
>    directory that start with "S", passing them "start".
> 
> The reason for all of this is to create a system that would allow
> the admin to have a system that can be brought up in various modes.
> 
> Traditionally these were:
> 
> 0. Shutdown, halt.
> 
> 1 or S. Single user
> 
> 2. Multi-user, no network services.
> 
> 3. Multi-user with network services.
> 
> 4. Undefined, usually 3 with major services (i.e. web, database, etc.).
> 
> 5. Undefined, used by some vendors for multi-user with network services
>    with xdm running on the console.
> 
> 6. Shutdown, reboot.
> 
> The idea is that if you need to do maintenance on the system without
> having users underfoot, you would go to runlevel 2 and kill off the
> network services.
> 
> The long and short of this is:
> 
> 1. Write a script that starts and stops the DQS services, as discussed
>    above.  Use the other scripts in /sbin/init.d as examples.  Call the
>    script something like dqs.
> 
> 2. Make the symlinks:
> 
>    ln -s /sbin/init.d/dqs /sbin/rc0.d/K01dqs
>    ln -s /sbin/init.d/dqs /sbin/rc2.d/K01dqs
>    ln -s /sbin/init.d/dqs /sbin/rc3.d/S87dqs
> 
> 3. Try rebooting the system.  If you do a shutdown (without "-h" or
>    "-r") to bring the system down to single user and then reboot,
>    dqs should shutdown and startup with the system.
> 
> Good luck,
> 
> Tom
> --

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-01-23 10:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-23 10:49 SUMMARY: DQS and reboot Jan Minar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox