Monitoring of nodes..

Martin Bjorklund mbj@REDACTED
Wed May 17 08:45:59 CEST 2000


Geoff Wong <geoff@REDACTED> wrote:
> 
> Indeed net_kernel:monitor_nodes(true) also gives unexpected behaviour.
> 
> If we do:
> 
> net_kernel:monitor_nodes(true),
> net_adm:ping(my@REDACTED),  % assuming this is up and responds with 'ping'
> receive X -> X end.
> 
> Then terminate my@REDACTED and we never get a nodedown message 
> on the node which ran net_kernel:monitor_nodes().

Note that you'll receive a nodeup message as well when you ping the
node:

(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).



/martin



More information about the erlang-questions mailing list