Liane Praza wrote: > Christine Tran wrote: >> On Fri, Oct 17, 2008 at 11:14 AM, Ceri Davies <ceri at submonkey.net> wrote: > We don't know a priori that your service will only have one PID at > startup, or may not create more as time goes on. We store only the > contract, sorry. > > (But, sometimes you can send a specific signal to some daemons to tell > them to do a graceful shutdown. :kill takes signal arguments so you can > choose something more or less violent as appropriate for your services. > Don't know if that's available for mysql.) Christine,
You can get the ctid from svcs -l <fmri> and the processes member from ctstat -vi <ctid> and then process the output of ctstat. The downside of this approach is that I don't think either output, 'svcs -l' or 'ctstat -iv' are stable so you can rest assured your script will not break. Antonello Example: [9:09:21 ~]% ctstat -vi `svcs -l cde-login|grep contract_id|awk '{print $2}'`|grep "member processes" member processes: 1680 1691 1692 1716 1776 1791 1792 1875 1878 1879 1895 1897 1913 2056 2059 2060 2061 2063 2066 2070 2079 2080 2089 2093 2096 2097 2101 2108 2110 2127 2129 2131 2133 2168 2169 2200 2211 2221 2235 2250 2251 2362 2377 2381 2655 3345 3346 3355 3356 3367 3368 3377 3378 3387 3388 3400 3415 3422 3425 3430 3544 3545 3561 3875 3876 3887 3890 3899 3900 3914 3921 3926 3930 3931 3940 3941 3956 4018 4019 4039 4077 4082 6224 7372 7373 10493 15829 15830 15992 17146 25740 25741 25763 25767 25768 25780 26444 26445 26764 27413 27414