General tasks
SMF is a particularly significant change in Solaris because it affects the management model. Therefore, although we encourage you to read more about SMF features (see the Details section below), you may want to start by learning how to perform some common system administration tasks.
Enabling and disabling services
In the previous version of Solaris 10, there was no good way to permanently disable the services in Solaris. A common method is to rename the corresponding RC script to a name that is no longer executing, but this change will be invalidated after the next system upgrade. In addition, inetd services are enabled and disabled through an entirely different approach, that is, editing a configuration file. Under SMF, these two types of services can be configured using the Svcadm (1M) command, and these changes will continue to be valid after the computer is upgraded. The following is a comparison of how certain services are enabled and disabled:
Old method: Mv/etc/rc2.d/s75cron/etc/rc2.d/x.s75cron
SMF method: Svcadm Disable System/cron:default
Old method: Edit/etc/inet/inetd.conf, uncomment the finger line
SMF method: Svcadm Enable Network/finger:default
In the example above, the last parameter of Svcadm is an FMRI of the service.
Note that Svcadm is used only for SMF services, and the traditional services controlled by RC scripts are the same as they were in earlier releases.
Stop, start, and restart services
In the past, the service was started by the RC script that ran at boot time and ran with the start parameter. Some RC scripts provide the stop option, and a few RC scripts also allow the use of restart. In SMF, these tasks are accomplished through the Svcadm (1M) command:
Old method:/etc/init.d/sshd stop
SMF method: Svcadm disable-t Network/ssh:default
Old method:/etc/init.d/sshd start
SMF method: Svcadm enable-t Network/ssh:default
Old method:/etc/init.d/sshd stop; /etc/init.d/sshd start
SMF method: Svcadm Restart Network/ssh:default
Old method: Kill-hup ' Cat/var/run/sshd.pid '
SMF method: Svcadm Refresh Network/ssh:default
The Svcadm enable and svcadm disable "-t" option indicates that the requested operation should be temporary (temporary) and does not affect whether the service will start on the next boot of the system. This contrasts with the "Enable and disable Services" example above.
As with enabling and disabling services, you should not use SVCADM to control services that are controlled by the RC script, which will always work in the same manner as in the earlier release.
Observe the boot process
As described in the "significant changes" section, by default, the boot process is much leaner than the earlier Solaris release. This reduces the "unwanted message" that does not provide valuable information, which may cause any actual problems that occur during the boot period to be not easily discovered.
Some new boot options have been added to control the level of detail of the boot. You may find a particularly useful option, "-M verbose," which prints a line of information when each service tries to start. This is similar to the default boot mode for some other operating systems that are based on UNIX and similar to UNIX. The detailed boot process looks like this:
OK boot-m verbose
Rebooting with command:boot-m verbose
Boot device:/pci@1c,600000/scsi@2/disk@0,0:afile and args:-M verbose
SunOS release 5.10 Version Generic 64-bit
Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved.
Use are subject to license terms.
[Network/pfil:default starting (Pfil)]
[Network/loopback:default Starting (Loopback network interface)]
[System/filesystem/root:default Starting (Root filesystem mount)]
Oct 13:53:02/13:system Start Time is Mon Oct 18 13:52:57 2004
[Network/physical:default Starting (physical network interfaces)]
[System/filesystem/usr:default starting (/usr and/mounted read/write)]
(more service Messages elided)
[System/filesystem/local:default starting (local filesystem mounts)]
[Network/ntp:default Starting (Network Time Protocol (NTP))]
[System/utmp:default Starting (utmpx monitoring)]
[System/filesystem/local:default starting (local filesystem mounts)]
[System/console-login:default Starting (console login)]
Demobox Console login:checking ufs filesystems
/dev/rdsk/c0t0d0s7:is logging.
OCT 13:53:14/50:system/system-log:default Starting
OCT 13:53:14/51:network/inetd:default Starting
OCT 13:53:14/52:system/cron:default Starting
(more service Messages elided)