What is it? (was Re: Current Run-Level: How can you tell?)

david.r.connet dcon at cbnewsc.att.com
Fri May 10 03:34:44 AEST 1991


In article <602 at fciva.FRANKCAP.COM> dag at fciva.UUCP (Daniel A. Graifer) writes:
>
>On our Prime EXL's,  which run pretty much Plain Vanilla AT&T SysV 3.1 with
>some 3.2 extensions, we have:
>
>	0 - Shutdown System
>	1 - Single User Mode
>	2 - Normal Multi-User
>	3 - Multiuser + remote file sharing
>	4 - Undefined by system
>	5 - Shutdown and entire ROM diagnostic monitor
>	6 - Shutdown and reboot
>
>We've defined to state 4 to be system backup.  A cron job in the wee dawn
>hours does a telinit 4 to start the backup process.  We also cleanup the
>cron log at that time, since cron isn't running in state 4.
>

>From the AT&T SVR4 init(1M) man page

0   shut the machine down so it is safe to remove the power.  Have the
    machine remove power if it can.

1   put the system in system administrator mode. All file systems are
    mounted.  Only a small set of essential kernel processes are left
    running.  This mode is for administrative tasks such as installing
    optional utility packages. All files are accessible and no users
    are logged in on the system.
       
2   put the system in multi-user mode.  All multi-user environment
    terminal processes and daemons are spawned.  This state is commonly
    referred to as the multi-user state.
      
3   start the remote file sharing processes and daemons.  Mount and
    advertise remote resources.  Run level 3 extends multi-user mode
    and is known as the remote-file-sharing state.
       
4   is available to be defined as an alternative multi-user environment
    configuration. It is not necessary for system operation and is
    usually not used.
          
5   Stop the UNIX system and go to the firmware monitor.
       
6   Stop the UNIX system and reboot to the state defined by the
    initdefault entry in /sbin/inittab.

S,s enter single-user mode.  When this occurs, the terminal which
    executed this command becomes the system console.  This is the
    only run level that doesn't require the existence of a properly
    formatted /sbin/inittab file.  If this file does not exist, then
    by default the only legal run level that init can enter is the
    single-user mode. When the system comes up to S or s, file systems
    for users' files are not mounted and only essential kernel processes
    are running.  When the system comes down to S or s, all mounted
    file systems remain mounted, and all processes started by init that
    should only be running in multi-user mode are killed.  In addition,
    any process that has a utmp entry will be killed.  This last
    condition insures that all port monitors started by the SAC are
    killed and all services started by these port monitors, including
    ttymon login services, are killed. Other processes not started
    directly by init will remain running.  For example, cron remains running.

If a 0 through 6 is entered, init enters the corresponding run level.
Run levels 0, 5, and 6 are reserved states for shutting the system
down.  Run levels 2, 3, and 4 are available as multi-user operating states.


Dave Connet
dcon at iwtng.att.com



More information about the Comp.unix.questions mailing list