<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">You can use inet:i(), if you trust the biased view of the emulator.<div class="">This will work on all platforms, even windows.</div><div class=""><br class=""></div><div class="">/Tony</div><div class=""><br class=""><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On 15 apr 2016, at 11:02, Ahmed Omar <<a href="mailto:spawn.think@gmail.com" class="">spawn.think@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">On Mac OS X netstat doesn't support the same options.<div class=""><br class=""></div><div class="">Instead you could use </div><div class=""><br class=""></div><div class="">lsof -n -iTCP | grep LISTEN | grep beam<br class=""></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class="">Best Regards,<br class="">- Ahmed Omar<div class=""><span style="color:rgb(51,51,51);font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;font-size:14px;line-height:18px" class=""><a href="http://about.me/spawn.think/" target="_blank" class="">http://about.me/spawn.think/</a></span></div></div></div></div>
<br class=""><div class="gmail_quote">On Fri, Apr 15, 2016 at 8:27 AM, Richard A. O'Keefe <span dir="ltr" class=""><<a href="mailto:ok@cs.otago.ac.nz" target="_blank" class="">ok@cs.otago.ac.nz</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br class="">
<br class="">
On 15/04/16 5:03 am, Magnus Henoch wrote:<br class="">
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Yes, leaving out the -sname/-name option is enough. You can verify this by looking for open ports for "beam" processes with netstat:<br class="">
<br class="">
$ netstat -ltpn | grep beam<br class="">
<br class="">
With -sname, it shows one open port:<br class="">
<br class=""></span>
tcp 0      0 <a href="http://0.0.0.0:36551/" rel="noreferrer" target="_blank" class="">0.0.0.0:36551</a> <<a href="http://0.0.0.0:36551/" rel="noreferrer" target="_blank" class="">http://0.0.0.0:36551</a>> 0.0.0.0:*               LISTEN      29262/beam.smp<br class="">
</blockquote>
<br class="">
For what it's worth, MacOS X 10.9 doesn't accept those command line options.<br class="">
% netstat -a<br class="">
shows these<br class="">
tcp4       0      0  localhost.epmd         localhost.61991 ESTABLISHED<br class="">
tcp4       0      0  localhost.61991        localhost.epmd ESTABLISHED<br class="">
tcp4       0      0  *.61990                *.* LISTEN<br class="">
tcp4       0      0  *.epmd                 *.* LISTEN<br class="">
when running with -sname; no lines contain 'beam'.<br class="">
<br class="">
I would like to know what the right command line options are for Mac OS X,<br class="">
if this is wrong.<div class="HOEnZb"><div class="h5"><br class="">
<br class="">
_______________________________________________<br class="">
erlang-questions mailing list<br class="">
<a href="mailto:erlang-questions@erlang.org" target="_blank" class="">erlang-questions@erlang.org</a><br class="">
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank" class="">http://erlang.org/mailman/listinfo/erlang-questions</a><br class="">
</div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></div></div></div></body></html>