Monitoring of nodes..

Geoff Wong geoff@REDACTED
Wed May 17 08:51:17 CEST 2000

> (a@REDACTED)1> net_kernel:monitor_nodes(true).
> ok
> (a@REDACTED)2> net_adm:ping(my@REDACTED).
> pong
> (a@REDACTED)3> receive X -> X end.
> {nodeup,my@REDACTED}
> (a@REDACTED)4> receive Y -> Y end.
>   [terminating my@REDACTED]
> {nodedown,my@REDACTED}
> If the node was already connected before thr ping, you wouldn't have
> received the nodeup though.  (however, you do receive the nodedown).

Hmm, I gave my example incorrectly. Basically I was
trying to indicate that net_kernel:monitor_nodes(true)
gives the same behaviour as Pekka was explaining  with 
the bif monitor_node.

erl -sname fud
Erlang (BEAM) emulator version 4.9.1 [source]

Eshell V4.9.1  (abort with ^G)
(fud@REDACTED)1> net_adm:ping(y@REDACTED).
(fud@REDACTED)2> net_adm:ping(x@REDACTED).
(fud@REDACTED)3> net_kernel:monitor_nodes(true).
(fud@REDACTED)4> receive A -> A end.
(fud@REDACTED)5> receive A -> A end.

I never get a nodedown when I take down y@REDACTED (after taking
down x@REDACTED).


More information about the erlang-questions mailing list