Monitoring of nodes..

Geoff Wong <>
Wed May 17 08:51:17 CEST 2000


> ()1> net_kernel:monitor_nodes(true).
> ok
> ()2> net_adm:ping().
> pong
> ()3> receive X -> X end.
> {}
> ()4> receive Y -> Y end.
>   
>   [terminating ]
> 
> {}
> 
> 
> 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)
()1> net_adm:ping().
pong
()2> net_adm:ping().
pong
()3> net_kernel:monitor_nodes(true).
ok
()4> receive A -> A end.
{}
()5> receive A -> A end.

I never get a nodedown when I take down  (after taking
down ).

Geoff






More information about the erlang-questions mailing list