anchor.diff:      send_vivaldi_errors(),
       set_last_active(NewState);
   
  -% @doc aggregates load information from the dht nodes and
  -%      and sends it out to ganglia if all nodes have replied
  +%% @doc aggregates load information from the dht nodes and
  +%%     and sends it out to ganglia if all nodes have replied
   on({ganglia_dht_load_aggregation, PID, AggId, Msg}, State) ->
       ?TRACE("~p: ~p~n", [AggId, Msg]),
       % all went well, we no longer need the failure detector
  
positive.code:     {get_node_details_response, [{load, Load}]} = Msg,
      CurAggId = get_agg_id(State),
      if
          % check for correct aggregation id
          AggId == CurAggId  ->
              NewState = set_agg_load(Load, State),
              agg_check_pending(NewState);
          % otherwise drop this message
          true -> State
      end;
  
  % @doc handler for messages from failure detector
  %      if a node crashes before sending out the load data
  %      we ignore its load information
  on({crash, _PID, {ganglia, AggId}}, State) ->
      ?TRACE("Node failed~n",[]),
      CurAggId = get_agg_id(State),
  
negative.code:     _ = gmetric(both, "Memory used by system", "int32", erlang:memory(system), "Bytes"),
      ok.
  
  %%@doc aggregate the number of key-value pairs
  %%     and the amount of memory for this VM
  -spec send_dht_node_metrics(state()) -> state().
  send_dht_node_metrics(State) ->
      DHTNodes = pid_groups:find_all(dht_node),
      AggId = get_agg_id(State),
      %% Memory Usage of DHT Nodes
      MemoryUsage = lists:sum([element(2, erlang:process_info(P, memory))
                               || P <- DHTNodes]),
      _ = gmetric(both, "Memory used by dht_nodes", "int32", MemoryUsage, "Bytes"),
      %% Query DHT Nodes for load, let them reply to the on handler ganglia_dht_node_reply
      %% The FD tells us if a node is down
      lists:foreach(fun (PID) ->
                            GlobalPID = comm:make_global(PID),
                            %% Let the failure detector inform ganglia about crashes of this DHT node
  