Solaris 10 Service Management

solaris 10

Under the Solaris 10 system – or the open Solaris as well,
the service management have been upgraded, and there are great new tools to handle the sysadmin
work on the services.

The long detailed explanation can be found here:
Solaris Service Management Facility – Quickstart Guide

But for the fast paced sysadmin – here is the short version :)

To see the detailed boot sequence with all the services notices use:

boot -m verbose

Stopping and starting services

stop a running service as well as make sure it wont come back after booting the server:

svcadm disable service_name

Bring the service back up and make sure it starts after boot as well:

svcadm enable service_name

The new and improved services system will also watch over the service, and restart it if it suddenly stop.
but don’t worry – if the service loops and can’t start, after a couple of time the SMF will stop trying to bring it up, and will send you an error for the service.

To stop or start the service temporarily without impacting the startup status of the service use:

svcadm -t enable/disable service_name

Getting information about the services

List all active services:

svcs

List all available services:

svcs -a

List all failing services:

svcs -x

to get more details on a specific failing service, use:

svcs -x service_name

to add verbosity to the svcs commands just add “-v”

the services logs are located at:
/var/svc/log
or:
/etc/svc/volatile

List all the processes this service is running, even if they have a different name:

svcs -p service_name

Viewing Dependencies

List all the services this service is depended upon, if any of these services fails, our service will fail too:

svcs -d service_name

List all the services that depend on our service, if our service fails, they will fail too:

svcs -D service_name

Service Names

the explanation for the service names im taking straight from the SUN bigadmin site:

Solaris uses a URI string called an FMRI (Fault Managed Resource Identifier) to identify system objects for which advanced fault and resource management capabilities are provided. Services managed by SMF are assigned FMRI strings prefixed with the scheme name “svc“, as shown in the following examples for the Solaris service syslogd(1M):

  • svc://localhost/system/system-log:default
  • svc:/system/system-log:default
  • system/system-log:default

Notice that these service FMRIs used by SMF can be expressed in three ways: first as an absolute path including a location path such as “localhost“; second as a path relative to the local machine; and third as simply the service identifier with the string prefixes implied. The SMF administrator tools described in the rest of this document typically describe services using the third form, as they are assumed to be operating on local services. Other management tools that operate on multiple types of resources or across machine boundaries may use one of the other forms to describe services. The SMF tools in the current release of Solaris can only manage services on the local host.

Solaris RunLevel

There are no longer run levels setting on the Solaris server, now this is called milestones.
Milestones are a group of services, which defines a state the server is in – just like single user, or multi user.
you can bring the server into a specific milestone with:

svcadm milestone milestone/single-user:default

to permanently set the server in a specific mile stone , use:

svcadm milestone -d milestone/single-user:default

and again – to list what services should be running to reach a specific milestone, use:

svcs -d milestone_name

and that’s the short explanation :)

next time ill explain how to add a service of your own to the system.

One thought on “Solaris 10 Service Management”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>