[erlang-questions] what *exactly* are sname and name ?
Sat Dec 9 22:02:05 CET 2006
Den 2006-12-09 19:45:54 skrev Joe Armstrong <>:
> On 12/9/06, Ulf Wiger <> wrote:
>> Just to point out the obvious, this is what the 'erl' man page says
>> -name and -sname:
> Well it's not obvious to me....
With 'obvious', I meant the fact that options to the 'erl'
command are documented in the man page for 'erl'. If not
obvious, it does have some logic to it. ;-)
> What on earth does this mean - I've read this several
> times and I don't understand it.
> "the host name portion of the node name
> will be the short name, not fully qualified."
If your hostname is aaa.bbb.ccc.com, the shortname is usually aaa.
> What does this mean????
> What It might mean might be the following (at least this would be
> logical, but it would mean that the syntactic form of Name in the two
> comands was different)
> erl -name
> makes a node with name
Well, possibly (I don't have erlang installed on this particular machine),
but the normal usage is
erl -name abc
makes a node with name
> erl -sname foo
> when my host name is aaa.bbb.ccc.com
> would create a node called
No, it would create a node called
where aaa is the short name version of aaa.bbb.ccc.com
> If this were the case then I see no reason why
> the node started with name would not be able to
> talk to the node started with sname ..
I believe the longnames() option is used to determine the method of
resolving node names, but someone else can surely give you much more
> When I do erl -sname foo on my machine (with hostname msi)
> erlang says my node is called:
> () >
> (ie not ) ....
> Goodness knows why
What does 'hostname' return on that machine?
localhost is a valid alias, so that might be a fallback if the hostname
hasn't been properly set.
More information about the erlang-questions