aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2014-07-21 11:03:54 +0200
committerAnders Svensson <[email protected]>2014-07-21 16:08:21 +0200
commit66833b6dc19dd7fd8a19862e7815c6c3c1b4f230 (patch)
treebeaff4b34cbb90aea2707898449b2dbda3ca1ebb /lib
parent3f090a60f737aa2410b47460d070401d9dd5179e (diff)
downloadotp-66833b6dc19dd7fd8a19862e7815c6c3c1b4f230.tar.gz
otp-66833b6dc19dd7fd8a19862e7815c6c3c1b4f230.tar.bz2
otp-66833b6dc19dd7fd8a19862e7815c6c3c1b4f230.zip
Add info item for diameter:service_info/2
To extract only process info from connections info, which can be useful to reduce the amount of information returned. Choose 'info' for the item since process_info is more than one word: all others are one. Don't choose memory since it's too specific: might want to use it for more.
Diffstat (limited to 'lib')
-rw-r--r--lib/diameter/src/base/diameter_service.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 8b25802568..44c2b707b7 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -1573,7 +1573,8 @@ transports(#state{watchdogT = WatchdogT}) ->
-define(OTHER_INFO, [connections,
name,
peers,
- statistics]).
+ statistics,
+ info]).
service_info(Item, S)
when is_atom(Item) ->
@@ -1663,6 +1664,7 @@ complete_info(Item, #state{service = Svc} = S) ->
keys -> ?ALL_INFO ++ ?CAP_INFO ++ ?OTHER_INFO;
all -> service_info(?ALL_INFO, S);
statistics -> info_stats(S);
+ info -> info_info(S);
connections -> info_connections(S);
peers -> info_peers(S)
end.
@@ -1846,6 +1848,13 @@ mk_app(#diameter_app{} = A) ->
info_pending(#state{} = S) ->
diameter_traffic:pending(transports(S)).
+%% info_info/1
+%%
+%% Extract process_info from connections info.
+
+info_info(S) ->
+ [I || L <- conn_list(S), {info, I} <- L].
+
%% info_connections/1
%%
%% One entry per transport connection. Statistics for each entry are