strange behaviour with net_kernel:monitor_nodes

luvish satija <>
Thu Jun 30 13:58:50 CEST 2005

Hello all,
  I am trying to make a simple network monitor. For
that I ran a program consising of the following code
(this is the concept which i'll be using in my


start() ->

monitor() ->
case net_kernel:monitor_nodes(true) of
   ok ->
     {nodedown, Node}->
       io:format("THE ~p NODE HAS BEEN DOWN and nodes
is ~p.~n",[Node, nodes()])
  Other ->
   io:format("unable to start monitor")

      Firstly i started ,  and then i
started my mon. To test, I first killed  and
then  I got the following output:

luvish $ erl -sname mon
Erlang (BEAM) emulator version 5.1 [source]

Eshell V5.1  (abort with ^G)
()1> mon:start().
THE  NODE HAS BEEN DOWN and nodes is [].
THE  NODE HAS BEEN DOWN and nodes is [].
THE  NODE HAS BEEN DOWN and nodes is [].

   Now the problem is that I'm getting the nodedown
message for  two times which is certainly not
desirable. Becuse if some node gets down, then action
should be taken only once. Note that second time, the
value of nodes() is [], so logically, nobody is
connected to  now but still third line is
   Am i missing something or more then one nodedown
messages are sent (then a should also show the same
behaviour)? Please help me to resolve this confusion.

Thanks in advance,

How much free photo storage do you get? Store your friends 'n family snaps for FREE with Yahoo! Photos

More information about the erlang-questions mailing list