On Fri, Oct 17, 2008 at 11:08:28AM -0400, Christine Tran wrote: > Hi, > > I'm writing a manifest for a DB; for a svcadm disable, I don't want to > do a pkill but a graceful shutdown. I have to work with the > possibility that there are other instances of the DB running on this > box, and those processes may or may not be managed by SMF. > > For the stop method, I check to see if there's a pid file, if that pid > matches the pid being managed by SMF, I shutdown. Else, I assume > those other running processes are not mine, print something, and exit.
The :kill token will only kill processes that SMF is managing anyway, so you could avoid any issues altogether that way, couldn't you? > There is restarter/start_pid, but nothing like a current_pid, which > leads me to believe SMF works through tracing the ctid to pids it > owns. I may have to do this, it's a little more work since I can't > grab it with svcprop, just checking that SMF does not keep a > current_pid value for the service somewhere in the repository. It > doesn't appear to, correct? 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 # Ceri -- That must be wonderful! I don't understand it at all. -- Moliere -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20081017/d696b54f/attachment.bin>