[erlang-questions] Erlang/OTP Embedded Systems in Solaris 10
Tue Aug 7 13:54:48 CEST 2007
On 07/08/07, Vance Shipley <> wrote:
> Since everything I am doing these days is on Solaris 10 I have
> reached the point where I want to make some fundamental changes.
> Solaris 10 has introduced the Service Management Facility (SMF)
> which replaces init with advanced functionality for managing
> services as collections of processes with dependencies and
> making sure they keep running. While SMF has replaced init it
> does support legacy rc scripts however without the extended
> I have started to build the service bundles which are XML files
> describing the dependencies, start up methods, etc. This
> could be simple enough but I started to wonder about things
> like whether I should start epmd from SMF and should I assume
> the role of the OTP start script and possible run_erl.
> I'd like to ask for any experiences or suggestions before I
> go too far. Ultimately I would like to see a new version of
> the Embedded Systems User's Guide for Solaris. I'll be happy
> to write it if I have support for it.
We have used SMF with erlang. While we succeeded in using SMF to
start/stop erlang at startup/shutdown of the message, we found out
that we still required heart. One problem with using SMF to start
erlang nodes is that epmd is placed under the same process group. So
when an erlang node dies, because epmd is still alive SMF thinks that
this "service" is still alive. One solution to this is to start epmd
separately before any of your erlang nodes as a separate SMF service.
A similar problem exists if one of your port programs (or even
something launched using os:cmd/1) doesn't quit when the erlang node
dies. SMF will not recognise node termination.
One good thing about SMF though is that you can specify dependencies
among erlang nodes on the same box, OTP style. It is definitely an
improvement over rc scripts.
More information about the erlang-questions