On Tue, 19 Jun 2007, Andrew.Rutz at Sun.COM wrote: > > hi james, > 'not quite sure what you're asking, but "svcs -a" will list > all the Services, event Disabled ones: > > sr1-uaus-03: svcs -a | head -3 > STATE STIME FMRI > legacy_run May_22 lrc:/etc/rcS_d/S29wrsmcfg > legacy_run May_22 lrc:/etc/rc2_d/S10lu > > > > also, sometimes one knows the executable that a Service runs, > but doesn't know the Service. I've used this to > reverse-engr the Svc name: > > (eg, this finds all Svcs that reference the devfsadm command: > > sr1-uaus-03: find /lib/svc/method/* | xargs -n 1 -t -i grep -i devfsadm {}
Rather than doing that, for most services the processes will stay in the same contract. So just do dartmouth 309 =>ps -o ctid -p `pgrep devfsadm` CTID 26 dartmouth 310 =>svcs -a -o ctid,fmri | grep 26 26 svc:/system/sysevent:default -- Dave