Certification Objective 3.05Service Management Facility and Run Levels


Certification Objective 3.05—Service Management Facility and Run Levels

Exam Objective 3.6: Explain the Service Management Facility and the phases of the boot process.

Exam Objective 3.7: Use SMF or legacy commands and scripts to control both the boot and shutdown procedures.

Solaris 10 offers Service Management Facility (SMF) to provide an infrastructure that augments the traditional UNIX startup scripts, init run levels, and configuration files. In the init phase, the unit process starts the svc.startd process, which is an SMF process, and it starts the system services.

Although many standard Solaris services are now managed by SMF, the scripts placed in the /etc/rc<n>.d directories continue to be executed when a run level transition occurs. Even though most of these scripts from the previous Solaris releases have been removed as a result of moving to SMF, the ability to continue running the remaining scripts allows for third-party applications and services to be added without the need to convert the services to use SMF.

There is another reason to keep the run-script infrastructure intact for now: the need to make the /etc/inittab and /etc/inetd.conf files available for packages to amend with post install scripts, called legacy-run services. You can use the inetconv command to convert these services to the SMF, which will add these services to the service configuration repository (the place where SMF maintains the configuration information). After a service has been converted to SMF, it will not need to make modifications to the /etc/inittab and /etc/inetd.conf files, and it will obviously not use the /etc/rc<n>.d scripts.

SMF offers the svcadm command to administer the SMF services. This command can also be used to change the run level of a system by selecting what is called a milestone at which to run. The svcadm command to change the run level has the following syntax:

    /usr/sbin/svcadm [-v] milestone [-d] <milestone_FMRI> 

If you do not use the -d option, this command will transition the system to the run level specified by <milestone_FMRI>. If you use the -d option, it will make the run level specified by the <milestone_FMRI> as the default run level for the system at boot time. The relationship between the values of <milestone_FMRI> and run levels is shown in Table 3-10.

Table 3-10: Relationship between the init run levels and the SMF milestones

Run Level

<milestone_FMRI>

S

milestone/single-user:default

2

milestone/multi-user:default

3

milestone/multi-user-server:default

The Fault Management Resource Identifier (FMRI) is a string that is used to identify a particular resource for which Solaris can perform automated fault management. You will learn more about SMF further on in this book. For example, the following command restricts the running services to a single-user mode:

    # svcadm milestone milestone/single-user 

The following command restores all the running services:

    svcadm milestone all 

Therefore, you can use the init command or the svcadm command to initiate a run-level transition. As an alternative to the initdefault entry in the inititab file, the following command will make run level 3 as the default run level:

    svcadm milestone -d milestone/multi-user-server 

The default milestone defined by the initdefault entry in the inittab file is not recognized in Solaris 10.

The three most important takeaways from this chapter are the following:

  • A number of programs are executed in the boot process in this order: POST to check the hardware and memory, the boot programs bootblk and ufsboot, kernel, init, and svc.startd. Shutting down a system means changing its run level to a level (0 or 5) from which it is safe to turn off the power.

  • The boot configuration variables can be managed with a number of commands issued at the Boot PROM command prompt ok, such as setenv command to set the value of a variable. You can also change the values of these variables at the OS command line by using the eeprom command.

  • In Solaris 10, most of the services are managed by the Service Management Facility (SMF), but the run control scripts are still executed to provide backward compatibility. Do not count on the initdefault entry in the inittab file; instead use the svcadm command to set (or change) the default run level of the system.




Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net