A system's run level (also known as an init state) defines what services and resources are available to users. A system can be in only one run level at a time.
The Solaris OS has eight run levels, which are described in the following
table. The default run level is specified in the /etc/inittab
file
as run level 3.
Table 14.2. Solaris Run Levels
In addition, the svcadm command can be used to change the run level of a system, by selecting a milestone at which to run. The following table shows which run level corresponds to each milestone.
Table 14.3. Solaris Run Levels and SMF Milestones
Run Level |
SMF Milestone FMRI |
---|---|
S |
|
2 |
|
3 |
|
Display run level information by using the who -r command.
$ who -r
Use the who -r command to determine a system's current run level for any level.
Example 14.1. Determining a System's Run Level
This example displays information about a system's current run level and previous run levels.
$ who -r
. run-level 3 Dec 13 10:10 3 0 S
$
Output of who |
Description |
---|---|
|
Identifies the current run level |
|
Identifies the date of last run level change |
|
Also identifies the current run level |
|
Identifies the number of times the system has been at this run level since the last reboot |
|
Identifies the previous run level |