Stephen Hahn wrote: > * Stephen Hahn <sch at sun.com> [2008-09-10 16:16]: >> * David Bustos <David.Bustos at sun.com> [2008-09-10 01:42]: >>> Quoth Jordan Brown on Tue, Sep 09, 2008 at 12:40:01PM -0700: >>>> David Bustos wrote: >>>>> And this wouldn't be stable, since "svcs" output is unstable. >>>> Is "svcs -H -o xxx,yyy,zzz" output unstable? It really should be >>>> stable, since it's clearly intended for script consumption. >>> Yes, it is unstable. I don't think script suitability should be married >>> to stability. File an RFE, if you wish. >> >> svcprop(1) provides a stable interface to all of the data that svcs -o >> would retrieve; it's designed for scripting (although I think Nico has >> a planned revision that improves its ease of use in scripting >> scenarios).
Indeed. Two questions: 1) Is there a list of the stabilities of the various properties? I assume that some are stable, but I assume that others are not. 2) Where's the documentation for the full FMRI including property, e.g. "svc:/application/scn/dhcpd:default/:properties/start/exec"? > ... except I don't think we've a stable scripting interface for > retrieving all instances on the system. That's an omission, so I'll > go add it to Jordan's RFE. svcprop '*' appears to list all of the properties for all of the instances in the system. Variations involving -p seem able to trim that down a bit, and in particular "svcprop -p restarter/state '*'" seems very plausible. The result isn't quite the same as svcs '*': - svcs includes lrc: services. - If you're not careful which property you pick, multi-line properties make svcprop output awkward. - svcprop includes services that have properties outside their instances. (Or something like that. I'm not sure I understand the difference here.) but it's pretty close.