anchor.diff:  snodes([], Acc) ->
   	lists:reverse(Acc).
   
  +%% @doc Parse service name statistics.
  +%% @todo check recursion OCS-488
  +%% @hidden
  +service_name([{ServiceName, PeerStat} | T]) ->
  +	io:fwrite("~w:~n", [ServiceName]),
  +	peer_stat(PeerStat),
  +	service_name(T);
  +service_name([_H | T]) ->
  +	service_name(T);
  +service_name([]) ->
  +	ok.
  +
  +
  +%% @doc Parse peer statistics.
  +%% @hidden
  +peer_stat([{_PeerFsm, PeerStats} | T]) ->
  +	peer_stat1(PeerStats, #{}),
  +	peer_stat(T);
  +peer_stat([]) ->
  +	ok.
  +%% @hidden
  +peer_stat1([{{{Application, CommandCode, _}, Direction, {RC, RcCount}}, Count} | T], Acc) ->
  +	NewAcc = case maps:find(Application, Acc) of
  +		{ok, CommandMap} ->
  +			case maps:find({CommandCode, Direction, RC, RcCount}, CommandMap) of
  +				{ok, Value} ->
  +					Acc#{Application => CommandMap#{{CommandCode, Direction, RC, RcCount} => Value + Count}};
  +				error->
  +					Acc#{Application => CommandMap#{{CommandCode, Direction, RC, RcCount} => Count}}
  +			end;
  +		error->
  +			Acc#{Application => #{{CommandCode, Direction, RC, RcCount} => Count}}
  +	end,
  +	peer_stat1(T, NewAcc);
  +peer_stat1([{{{Application, CommandCode, _}, Direction}, Count} | T], Acc) ->
  +	NewAcc = case maps:find(Application, Acc) of
  +		{ok, CommandMap} ->
  +			case maps:find({CommandCode, Direction}, CommandMap) of
  +				{ok, Value} ->
  +					Acc#{Application => CommandMap#{{CommandCode, Direction} => Value + Count}};
  +				error->
  +					Acc#{Application => CommandMap#{{CommandCode, Direction} => Count}}
  +			end;
  +		error->
  +			Acc#{Application => #{{CommandCode, Direction} => Count}}
  +
  +	end,
  +	peer_stat1(T, NewAcc);
  +peer_stat1([], Acc) ->
  +	F2 = fun(Command, Count, _Acc) ->
  +				dia_count(Command, Count)
  +	end,
  +	F1 = fun(Application, CommandMap, _Acc) ->
  +				dia_application(Application),
  +				maps:fold(F2, [], CommandMap)
  +	end,
  +	maps:fold(F1, [], Acc).
  +
  +-spec dia_application(Application) -> ok
  +	when
  +		Application :: non_neg_integer().
  +%% @doc Print the Application name header.
  +dia_application(0) ->
  +	io:fwrite("    Base: ~n");
  +dia_application(1) ->
  +	io:fwrite("    Nas: ~n");
  +dia_application(5) ->
  +	io:fwrite("    EAP: ~n");
  +dia_application(16777250) ->
  +	io:fwrite("    STa: ~n");
  +dia_application(16777264) ->
  +	io:fwrite("    SWm: ~n");
  +dia_application(16777265) ->
  +	io:fwrite("    SWx: ~n");
  +dia_application(16777251) ->
  +	io:fwrite("    S6a: ~n");
  +dia_application(16777272) ->
  +	io:fwrite("    S6b: ~n");
  +dia_application(4) ->
  +	io:fwrite("    Ro: ~n");
  +dia_application(16777238) ->
  +	io:fwrite("    Gx: ~n").
  +
  +-spec dia_count(Command, Count) -> ok
  +	when
  +		Command :: tuple(),
  +		Count :: non_neg_integer().
  +%% @doc Print the command name and count.
  +dia_count({257, send}, Count) ->
  +	io:fwrite("      	CER: ~b~n", [Count]);
  +dia_count({257, recv}, Count) ->
  +	io:fwrite("        CEA: ~b~n", [Count]);
  +dia_count({280, send}, Count) ->
  +	io:fwrite("        DWR: ~b~n", [Count]);
  +dia_count({280, recv}, Count) ->
  +	io:fwrite("        DWA: ~b~n", [Count]);
  +dia_count({271, send}, Count) ->
  +	io:fwrite("        ACR: ~b~n", [Count]);
  +dia_count({271, recv}, Count) ->
  +	io:fwrite("        ACA: ~b~n", [Count]);
  +dia_count({282, send}, Count) ->
  +	io:fwrite("        DPR: ~b~n", [Count]);
  +dia_count({282, recv}, Count) ->
  +	io:fwrite("        DPA: ~b~n", [Count]);
  +dia_count({258, send}, Count) ->
  +	io:fwrite("        RAR: ~b~n", [Count]);
  +dia_count({258, recv}, Count) ->
  +	io:fwrite("        RAA: ~b~n", [Count]);
  +dia_count({274, send}, Count) ->
  +	io:fwrite("        ASR: ~b~n", [Count]);
  +dia_count({274, recv}, Count) ->
  +	io:fwrite("        ASA: ~b~n", [Count]);
  +dia_count({275, send}, Count) ->
  +	io:fwrite("        STR: ~b~n", [Count]);
  +dia_count({275, recv}, Count) ->
  +	io:fwrite("        STA: ~b~n", [Count]);
  +dia_count({272, send}, Count) ->
  +	io:fwrite("        CCR: ~b~n", [Count]);
  +dia_count({272, recv}, Count) ->
  +	io:fwrite("        CCA: ~b~n", [Count]);
  +dia_count({257, send, RC, RcCount}, Count) ->
  +	io:fwrite("        CER ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({257, recv, RC, RcCount}, Count) ->
  +	io:fwrite("        CEA ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({280, send, RC, RcCount}, Count) ->
  +	io:fwrite("        DWR ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({280, recv, RC, RcCount}, Count) ->
  +	io:fwrite("        DWA ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({271, send, RC, RcCount}, Count) ->
  +	io:fwrite("        ACR ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({271, recv, RC, RcCount}, Count) ->
  +	io:fwrite("        ACA ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({282, send, RC, RcCount}, Count) ->
  +	io:fwrite("        DPR ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({282, recv, RC, RcCount}, Count) ->
  +	io:fwrite("        DPA ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({258, send, RC, RcCount}, Count) ->
  +	io:fwrite("        RAR ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({258, recv, RC, RcCount}, Count) ->
  +	io:fwrite("        RAA ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({274, send, RC, RcCount}, Count) ->
  +	io:fwrite("        ASR ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({274, recv, RC, RcCount}, Count) ->
  +	io:fwrite("        ASA ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({275, send, RC, RcCount}, Count) ->
  +	io:fwrite("        STR ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({275, recv, RC, RcCount}, Count) ->
  +	io:fwrite("        STA ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({282, send, RC, RcCount}, Count) ->
  +	io:fwrite("        DPR ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({272, send, RC, RcCount}, Count) ->
  +	io:fwrite("        CCR ~w ~b: ~b~n", [RC, RcCount, Count]);
  +dia_count({272, send, RC, RcCount}, Count) ->
  +	io:fwrite("        CCA ~w ~b: ~b~n", [RC, RcCount, Count]).
  
positive.code: 	Info = [peer, applications, capabilities,
  			transport, connections, statistics],
  	diameter_service_info(Services, Info, []);
  diameter_service_info(Services, Info) ->
  	diameter_service_info(Services, Info, []).
  %% @hidden
  
negative.code: -export([help/0, ts/0, td/0, su/0]).
  -export([di/0, di/1, di/2, dc/0]).
  -export([ll/1, ll/2, ql/2, ql/3, ql/4]).
  %%remove after debugging
  -export([service_name/1]).
  
  -include("ocs.hrl").
  -include("ocs_log.hrl").
  