Tom Whitten writes:
> Dan Groves writes:
> > Date: Thu, 26 Apr 2007 17:34:28 -0400
> > To: smf-discuss at opensolaris.org
> > From: Dan Groves <Daniel.Groves at sun.com>
> > Subject: [smf-discuss] Vanity naming, inconsistent SMF properties,
> >     and maintenance mode
> > Cc: clearview-discuss <clearview-discuss at opensolaris.org>
> > 
> > Hi,
> > 
> > We're working on a problem in vanity naming about how to handle the case 
> > where links stored in linkmgmtd's SMF repository get into state where 
> > there are duplicate link entries.
> > 
> > With vanity naming, we represent links as property groups named by the 
> > link ID.  Each property group contains the link attributes.  The case 
> > I'm thinking of is where we have two or more links each with different 
> > IDs but with each link having the same name.  For example, we'd have in 
> > SMF property groups with names link1 and link2, and each one contains a 
> > property called "name" with value "net0".
> > 
> > When this occurs, we would like to put the service into a maintenance 
> > state, and when the administrator does "svcs -xv linkmgmtd" see 
> > something that indicates what went wrong.  Is there a best practice for 
> > this?  If so, what is it?
> > 
> > thanks,
> > Dan
> > 
> > _______________________________________________
> > smf-discuss mailing list
> > smf-discuss at opensolaris.org
> 
> Dan,
> 
> You can call smf_maintain_instance() to place an instance in the
> maintenance state.  I'm still researching how svcs -xv determines what
> messages to display.  I'll send a follow up mail when I get the figured
> out.
> 
> tom

Dan,

In looking at the code for svcs, it appears that the messages that are
printed via svcs -xv are constructed by svcs based on an analysis of
information in the repository.  In other words, I could find no way for a
service instance to set service instance specific information for display
by svcs -xv.  You can of course write this information to the service
specifice log (/var/svc/log/service:instance.log).  svc.startd will set
stdout and stderr of the methods that it starts to point to this file, and
svcs -xv displays the name of this log.

tom

Reply via email to