Go to main content

Developing System Services in Oracle® Solaris 11.3

Exit Print View

Updated: September 2018
 
 

Storing Periodic Service Data in the Service Configuration Repository

As described in Specifying the periodic_method Element, the periodic_method element provides both method information (an exec_method property group for the start method) and scheduling information (a periodic property group) for periodic services. When a manifest with a periodic_method element is imported, the data described in this section is stored in the service configuration repository.

Restarter Properties

The restarter for the service is set to svc:/system/svc/periodic-restarter:default. Administrators can use the svcs -l command to show the restarter or use the svccfg or svcprop command to view the general/restarter property.

Because a periodic service instance remains online between invocations of the start method, the instance can be in the online state with no associated contracted processes running on the system. For an online periodic service instance, the auxiliary_state property can have one of the following values to distinguish whether the method action is running:

running

The instance is online and has associated contracted processes.

scheduled

The instance is online but has no associated contracted processes.

To check this state, administrators can use the svcs -o astate command to show the ASTATE column or use the svccfg or svcprop command to view the general/auxiliary_state property.

periodic Property Group

The scheduling attributes of the periodic_method element (period, delay, jitter, persistent, and recover) are stored as properties of a property group named periodic. See Specifying the periodic_method Element for definitions of these attributes and see Scheduling Executions of a Periodic Service Start Method for examples of how they are used. Administrators can use the svcprop and svccfg commands to show and modify these periodic property group properties.

Last and Next Start Method Invocations

The service configuration repository also stores the following two pieces of scheduling information for the instance:

last_run

The absolute time of the last attempt to run the start method of this instance. If the start method has never run, this property does not exist. To check this time, administrators can use the svcs -o lrun command to show the LRUN column.

next_run

The absolute time of the next attempt to run the start method of this instance. If an absolute time does not exist, this property might be absent or have no value. The value of next_run is computed at the time last_run is set and is the next scheduled start method invocation as described in Scheduling Executions of a Periodic Service Start Method, including the specific RAND(jitter) value for that invocation. To check this time, administrators can use the svcs -o nrun command to show the NRUN column. This time is managed by the periodic-restarter service for each periodic service instance. Administrators cannot modify this value.

start Property Group

The exec and timeout_seconds values and method_context information are stored as properties of a property group named start. This start property group represents the start method for the periodic service and is defined in the same way as the start method for any other service.