|
|||
|
UNIX Operating Levels The UNIX system is a multi-user, time-sharing system that supports different operating levels or service levels. The system supports a number of different operating or run-level modes. In general, the system is operating in what is known as multi-user mode. More specifically, the multi-user mode maps to run level 2, which is usually the default mode configured when the system boots. This run level is defined as permitting users to access the system, and also critical system processes and resources are available. Table 1 lists the available run levels within UNIX. The UNIX system uses a standard init configuration file to control run levels and which services are started (or stopped when the system is brought down) when the system is booted. The /etc/inittab is read by the init process during system startup or shutdown. Also, when the system administrator edits this file, the init process can re-read this file when necessary. The /etc/inittab files for Solaris, HP-UX, and Linux differ not so much in syntax, but in contents. In other words, the services started for their run levels are different, but the basic structure of the files is the same. Table 1: Standard UNIX Operating (Run) Levels Code:
Run Level and Description S or s: Place the system in single-user mode. This mode is used for system maintenance. 0: Causes the system to be halted. 1: Places the system in single-user mode (Linux only). 2: Multi-user mode without NFS (Linux). Multi-user mode, but without network services (Solaris and HP-UX). 3: Multi-user mode; typically the default run level with full system services. 5: X11 workstation (Linux only) Shut down the system so that the power can be off (Solaris and HP-UX). This is the default run level for Linux. 6: Causes the system to be rebooted. Regardless of the operating system version, /etc/inittab entries contain a standard set of fields and syntax. Each /etc/inittab entry includes the following: 1) Entry ID: This ID uniquely specifies each entry within the file. Any two characters can be used. 2) Run-level value: The run-level value determines which run level this entry will be invoked. For example, run level 3 indicates multi-user mode. 3) Action keyword: The action keyword denotes the way that init will execute the command at the specified run level. The most common action keywords are listed in Table 2. 4) Process: This field includes the actual program that will be invoked when the run level is entered. Typically, this invokes the startup scripts that are associated with each run level. Table 2: Common /etc/inittab Action Keywords Code:
Keyword and Meaning respawn: Start the process and don’t wait for it to terminate. Restart the process when the run level is entered. wait: Star the process, but wait until it terminates. once: When the run level is entered, invoke the process and don’t wait for the process to finish. If the process terminates, don’t restart it. boot: Process this entry only when the boot phase is started bootwait: Process this entry when the system enters multi-user mode from single-user mode after the system has booted. powerfail: Invoke this entry when the process associated with this entry is sent a powerfail signal. off: If the process of this entry is currently running, shut down. Otherwise, do nothing. initdefault: Specifies the default run level. |
![]() |
| Bookmarks |
| Tags |
| oerating system, unix, unix operating levels |
| Thread Tools | |
| Display Modes | |
|
|