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:             State
      end;
  
  % @doc receives requested latency and transactions/s
  %      rrd data from the monitor and sends it to Ganglia
  on({get_rrds_response, Response}, State) ->
      RRDMetrics =
          case Response of
  
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
  