Sangeeta Misra wrote:
>
>
> In ILB project,  the persistent configuration is kept in the SCF 
> framework and a user would use svcadm  to enable/disable the ILB 
> service. My question is, in the event that the ILB service, 
> experiences a fatal error, is there a programmatic way to put ILB 
> service in maintainance mode ( to prevent the service from going into 
> a cycle or restart followed by fatal error)?
If the ILB service daemon can detect such fatal errors
once it has daemonized, you can use the libscf function

smf_maintain_instance(ILB_FMRI, SMF_IMMEDIATE)

(where ILB_FMRI points at the ILB service instance)

...to kill the associated running processes and put the
instance into maintenance. If there are fatal conditions
detectable before daemonizing, simply exit with
errorcode 95 (SMF_EXIT_ERR_FATAL).

Hope this helps,

Alan

Reply via email to