tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How Unix manages processes in userland

On Sun, Dec 08, 2013 at 11:05:31PM +0000, David Holland wrote:
> Yes, and if the question is: rework it, or throw it out and replace it
> with something totally different and incompatible; then I'd rather
> rework it. This is not a NIH response so much as a recognition of the
> difficulties associated with migrating deployed systems.

or perhaps just the ability to import the current rc.d config into
something else - that should be able to be automated to a fair degree.

> Also, while your attention is still on this, please describe what
> you'd consider the properties of a "proper service management
> facility" to be. I haven't seen this Solaris thing you referenced
> (thankfully the last time I had to deal with administering Solaris was
> more than ten years ago) but I have seen various other things, most of
> which seem like badly conceived bolt-ons to sysvinit.

SMF is a total rework, not a bolt on to sysvinit.  A service is
described by a manifest which is a bit of XML that provides all the
information that SMF needs to run the service - this XML is imported
into the service "database" .  The manifest contains information like
the name of the service, a description, dependencies, what action to
start the service, what action to stop the service, what action to
restart the service, timeouts for start and stop, command line flags for
the daemon for the service plus a lot of other things I have forgotten
(I don't write SMF manifests often...).  Once the SMF knows about the
service you will usually see the service in one of three states (there
are more but not common), one is disabled - the service is not
configured to start, one is enabled - the service is configured to run
and, lastly, maintenance - the service was attempted to be started but
there was a problem and it has been suspended pending administrator
intervention.  Usually a service will hit maintenance if the daemon
restarts too quickly due to, say, a configuration error - once the error
has been corrected then there is a command to tell SMF that the fault
has been cleared and it can now start the service again.  Note that if a
daemon just exits it will be restarted it is only if it exits repeatedly
will the service enter maintenance mode.

Here is a more cogent description of SMF for those interested:

Brett Lymn
Staple Guns: because duct tape doesn't make that KerCHUNK sound -

Home | Main Index | Thread Index | Old Index