Managing System services in Solaris

Source: Internet
Author: User

Solaris systems, similar to Windows systems, also have service concepts. the most common services are SSH and telnet. in Windows, services are managed by running services. MSC. there are similar tools under Solaris.

1. View services
SVCs allows you to view the services in the system. After the-a switch is added, you can view the services that have been disable, that is, the services that have been disabled.
----------------------------------------------------------------
Bash-3.00 # SVCs-A | less
State stime fMRI
Legacy_run 15:00:58 LRC:/etc/rc3_d/s52imq
Legacy_run 15:00:58 LRC:/etc/rc3_d/s80mipagent
Legacy_run 15:00:58 LRC:/etc/rc3_d/s84appserv
Disabled 15:00:21 svc:/system/metainit: Default
Disabled 15:00:21 svc:/system/device/mpxio-Upgrade: Default
Disabled 15:00:22 svc:/Network/IPSec/ike: default

About the service status, we learned from Man SMF that the services in the Solaris system are in the following statuses:
Uninitialized this is the initial state for all service
Instances. Instances are moved to mainte-
Nance, offline, or a disabled State
Evaluation by SVC. startd (1 m) or
Appropriate restarter.

Offline the instance is enabled, but not yet run-
Ning or available to run. If restarter Exe-
Cution of the Service start method or
Equivalent method is successful,
Instance moves to the online state.
Failures might lead to a degraded or
Maintenance state. Administrative Action
Can lead to the uninitialized state.

Online the instance is enabled and running or is
Available to run. The specific nature
The online state is application-Model
Specific and is defined by the restarter
Responsible for the service instance.
Online is the expected operating state
A properly configured service with all
Dependencies satisfied. failures of
Instance can lead to a degraded or mainte-
Nance state. Failures of services on which
The instance depends can lead to offline or
Degraded states.

Degraded the instance is enabled and running or
Available to run. The instance, however, is
Functioning at a limited capacity in com-
Parison to normal operation. Failures
The instance can lead to the Maintenance
State. Failures of services on which
Instance depends can lead to offline or
Degraded states. Restoration of capacity
Shocould result in a transition to the online
State.

Maintenance the instance is enabled, but not able
Run. administrative action is required
Restore the instance to offline and subse-
Quent states. The maintenance state might
Be a temporarily reached state if an admin-
Istrative operation is underway.

Disabled the instance is disabled. Enabling the ser-
Vice results in a transition to the offline
State and eventually to the online State
With all dependencies satisfied.

Legacy-run this state represents a legacy instance
That is not managed by the Service manage-
Ment facility. Instances in this state have
Been started at some point, but might or
Might not be running. Instances can only be
Observed using the facility and are not
Transferred into other States.

----------------------------------------------------------------
2. Service start and stop
Svcadm is used to enable and disable management of services.
Usage: svcadm [-V] [Command [parameter...]

Svcadm enable [-rst] <service>...-enable the Service and bring the service online
Svcadm disable [-st] <service>...-Disable the service and take the service offline
Svcadm restart <service>...-restart the specified service.
Svcadm refresh <service>...-re-read service configuration
Svcadm mark [-It] <status> <service>...-set maintenance status
Svcadm clear <service>...-Clear maintenance status
Svcadm milestone [-D] <milestone>-entering service milestones

3. service configuration and Modification
You can use svccfg to modify system services. However, because I do not know much about Solaris, I do not dare to modify the services in the system.

There are so many records for the time being.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.