Managing System Services in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014

Rereading Service Configuration

When you change service configuration, those changes do not immediately appear in the running snapshot. Those changes are stored in the service configuration repository as current, or editing, property values. The refresh operation updates the running snapshot of the specified service instance with the values from the editing configuration.

The svcadm refresh and svccfg refresh commands both perform the following steps:

  1. Create a new running snapshot to commit the editing properties into the running snapshot.

  2. Run the refresh method of the instance, if a refresh method exists and the instance is in the online or degraded state. The refresh method should notify the application that changes have been made. The refresh method might reread property values from the running snapshot. Even if no refresh method exists, the configuration in the running snapshot is updated.

The svcadm refresh command operates on a service instance. The svccfg refresh command operates on a service instance or on a parent service. If a service is specified, the svccfg refresh command refreshes all instances of that service. While snapshots are taken only for service instances and not for parent services, parent service properties are inherited by service instances. Changed parent service properties appear in a service instance snapshot if the instance does not override those changes.

Some changes, such as dependency changes, take effect immediately. Other changes do not become effective until the service is restarted as described in Restarting a Service. Changes that cannot be made while the application is running require a refresh followed by a restart. Examples of changes that cannot be made while the application is running include closing or opening a socket or resetting an environment variable.

If you specify the -s option with the svcadm refresh command, svcadm refreshes the instance and waits for the instance to enter the online, degraded, or maintenance state before returning. The svcadm command returns when the instance reaches one of these states or when it determines that the instance requires administrator intervention to reach one of these states. Use the -T option with the -s option to specify an upper bound in seconds to make the transition or determine that the transition cannot be made.