[erlang-questions] Disable Distribution

Marco Molteni marco.molteni@REDACTED
Fri Apr 15 10:49:25 CEST 2016


On 15 Apr 2016, at 08:27, Richard A. O'Keefe <ok@REDACTED> wrote:


> On 15/04/16 5:03 am, Magnus Henoch wrote:
>> Yes, leaving out the -sname/-name option is enough. You can verify this by looking for open ports for "beam" processes with netstat:
>> 
>> $ netstat -ltpn | grep beam
>> 
>> With -sname, it shows one open port:
>> 
>> tcp 0      0 0.0.0.0:36551 <http://0.0.0.0:36551> 0.0.0.0:*               LISTEN      29262/beam.smp
> 
> For what it's worth, MacOS X 10.9 doesn't accept those command line options.
> % netstat -a
> shows these
> tcp4       0      0  localhost.epmd         localhost.61991 ESTABLISHED
> tcp4       0      0  localhost.61991        localhost.epmd ESTABLISHED
> tcp4       0      0  *.61990                *.* LISTEN
> tcp4       0      0  *.epmd                 *.* LISTEN
> when running with -sname; no lines contain 'beam'.
> 
> I would like to know what the right command line options are for Mac OS X,
> if this is wrong.

You can use `lsof`, available on Linux, *BSD and Mac:

terminal 1:

$ erl -sname pizza

terminal 2:

$ lsof | grep TCP | grep beam
beam.smp  5732 mmolteni   24u    IPv4 0xa52d786c22d20475       0t0      TCP *:51822 (LISTEN)
beam.smp  5732 mmolteni   25u    IPv4 0xa52d786c27d8519d       0t0      TCP localhost:51823->localhost:epmd (ESTABLISHED)





More information about the erlang-questions mailing list