I want it to stop monitoring it for sometime so that I can stop my server (my main motivation is that smf wont start my server again automatically once i manually stopped it) and then start it again (i will start manually) and then tell smf to start monitoring it again... thanks
Asked
Active
Viewed 340 times
2 Answers
1
If you need to stop your SMF service just run svcadm disable
on it and SMF will disable and "stop monitoring it". SMF will not take any further actions after you disabled the service and you'll free to mess with it in any way you want (change config files, move files, etc). After you're done just svcadm enable
it.
SMF isn't just monitoring but also actively managing your services. It's different from other solutions (eg. in Linux) where you'd start the service through /etc/init.d scripts and daemontools would monitor/restart them.
![](../../users/profiles/45673.webp)
Giovanni Tirloni
- 5,693
- 3
- 24
- 49
-
The key part of the question was starting it manually and then have SMF take over monitoring the running process. I don't believe that's possible. – JOTN Mar 07 '11 at 14:13
0
I don't believe you can do that because SMF would have no idea what processes to monitor after you started the service manually. It needs to do the start.
![](../../users/profiles/61787.webp)
JOTN
- 1,727
- 1
- 10
- 12
-
1then any chance i can tell SMF to unmonitor my service (without svccfg remove) and then i would do whatever I want with it and when I want my server app I will use the standard svcadm enable to start my server? – Jas Mar 06 '11 at 14:23
-
Sure, you can do "svcadm disable" to turn off the service and then start it manually. When done, shut it down manually and do an "svcadm enable" to tell it to take over management again. – JOTN Mar 06 '11 at 19:32
-
well I understood that the answer is NO - not possible with smf however "outragios" I find it simply does not support it. so i will have to find workarounds. i find it amazing it does not support it. – Jas Mar 08 '11 at 09:53
-
Doesn't support taking over monitoring of a process you started? How would it know what to monitor? – JOTN Mar 12 '11 at 00:21
-
after i unmonitor, i stop my service by myself and start it up again with smf so it would know to monitor it... problem is that i can't tell smf to unmonitor my service before i stop my server manually... – Jas Apr 04 '11 at 16:16