Christine Tran wrote: > On Fri, Oct 17, 2008 at 11:14 AM, Ceri Davies <ceri at submonkey.net> wrote: >> The :kill token will only kill processes that SMF is managing anyway, so >> you could avoid any issues altogether that way, couldn't you? > > Yeah, but I don't want a :kill, I want a nice shutdown. DBs are so > temperamental. > >> You want something like this, I think, don't you? >> >> # svcs -p rpc/bind >> STATE STIME FMRI >> online Jul_31 svc:/network/rpc/bind:default >> Jul_31 5090 rpcbind >> # > > More like > > MYSQL_CURPID=`getproparg restarter/current_pid`, it's a method I'm writing. > > I can get around it with getproparg restarter/contract, then a pgrep > -c $ctid; just want to check that I don't have to. Small script == > beautiful.
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.) liane