anchor.diff:        traverse(RcvSnd, Iter2)
     end.
   
  --spec gmetric(Slope::both | positive, Metric::string(), Type::string(), Value::number(), Unit::string()) -> string().
  -gmetric(Slope, Metric, Type, Value, Unit) ->
  -    Cmd = lists:flatten(io_lib:format("gmetric --slope ~p --name ~p --type ~p --value ~p --units ~p~n",
  -                         [Slope, Metric, Type, Value, Unit])),
  -    Res = os:cmd(Cmd),
  -    ?TRACE("~s: ~s~n", [Cmd, Res]),
  -    Res.
  -
  --spec monitor_vivaldi_errors(pid_groups:groupname(), non_neg_integer()) -> ok | string().
  -monitor_vivaldi_errors(Group, Idx) ->
  +-spec send_vivaldi_errors(pid_groups:groupname(), non_neg_integer()) -> ok | string().
  +send_vivaldi_errors(Group, Idx) ->
       case pid_groups:pid_of(Group, vivaldi) of
           failed ->
               ok;
  
positive.code:     _ = gmetric(both, "Memory used by atoms", "int32", erlang:memory(atom), "Bytes"),
      _ = gmetric(both, "Memory used by binaries", "int32", erlang:memory(binary), "Bytes"),
      _ = gmetric(both, "Memory used by system", "int32", erlang:memory(system), "Bytes"),
      DHTNodesMemoryUsage = lists:sum([element(2, erlang:process_info(P, memory))
                                      || P <- pid_groups:find_all(dht_node)]),
      _ = gmetric(both, "Memory used by dht_nodes", "int32", DHTNodesMemoryUsage, "Bytes"),
      % Statistics in RRD (Load, Latency)
      RRDMetrics = fetch_rrd_metrics(),
      _ = case RRDMetrics of
              [] -> ok;
              _  ->  _ = [gmetric(both, Metric, Type, Value, Unit) || {Metric, Type, Value, Unit} <- RRDMetrics],
                     ok
          end,
      % Local Load
      LocalLoad = fetch_local_load(),
      _ = [gmetric(both, Metric, Type, Value, Unit) || {Metric, Type, Value, Unit} <- LocalLoad],
      % vivaldi statistics
      monitor_per_dht_node(fun monitor_vivaldi_errors/2, pid_groups:groups_with(dht_node)),
      set_last_active(State).
  
  
  -spec traverse(received | sent, Iter1::term()) -> ok.
  traverse(RcvSnd, Iter1) ->
  
negative.code: -spec on(message(), state()) -> state().
  on({ganglia_trigger}, {LastActive, TriggerOld}) ->
      Trigger = trigger:next(TriggerOld),
      gen_component:post_op(_State = {LastActive, Trigger}, _Message = {ganglia_periodic});
  
  on({ganglia_periodic}, State) ->
      send_general_metrics(),
      send_dht_node_metrics(),
      send_message_metrics(),
      send_rrd_metrics(),
      send_vivaldi_errors(),
      set_last_active(State).
  
  send_general_metrics() ->
      % general erlang status information
      _ = gmetric(both, "Erlang Processes", "int32", erlang:system_info(process_count), "Total Number"),
      _ = gmetric(both, "Memory used by Erlang processes", "int32", erlang:memory(processes_used), "Bytes"),
  