On Wed, May 17, 2006 at 02:10:03PM -0700, lianep at eng.sun.com wrote:
> In the meantime, you could put together a new service which runs this 
> sort of checking, and runs an appropriate svcadm command when the tests 
> fail.  It isn't particularly elegant, but would be pretty simple to do.
> The big thing is you'd want to take into account the target service's 
> "state" and "next_state", and not send a bunch of restart commands if 
> the service is offline, in maintenance, or in the middle of a 
> transition.

Or perhaps you could fire off a monitor from the start method of the
actual service to be monitored using ctrun to run the monitor in its own
process contract and restartably.  This avoids having a separate SMF
service polluting the SMF service namespace.

Liane, are any of the future property names related to monitors
committed yet?  (I'm thinking that start methods that do what I suggest
could check for the presence of monitor support and do this ctrun thing
only if monitor support is absent or not configured for the given
service.  Checking for monitor-specific properties is hardly the only
way to do this.  Perhaps you could commit to a shell function name for
this purpose.)

Nico
-- 

Reply via email to