aboutsummaryrefslogtreecommitdiffstats
path: root/lib/runtime_tools/src
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2017-05-09 08:26:51 +0200
committerDan Gudmundsson <[email protected]>2017-05-09 11:38:31 +0200
commit769d0e95bf09f1c55e5d176a5f261c4767995b2b (patch)
tree15138e70fbb3f1211b69331ce1add2b36a6cd01e /lib/runtime_tools/src
parent66c23a4fa9f92eb510cf55daa17822c926d7c147 (diff)
downloadotp-769d0e95bf09f1c55e5d176a5f261c4767995b2b.tar.gz
otp-769d0e95bf09f1c55e5d176a5f261c4767995b2b.tar.bz2
otp-769d0e95bf09f1c55e5d176a5f261c4767995b2b.zip
observer: chunk process list info
Diffstat (limited to 'lib/runtime_tools/src')
-rw-r--r--lib/runtime_tools/src/observer_backend.erl19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl
index 1e0d2d642e..d36af257ce 100644
--- a/lib/runtime_tools/src/observer_backend.erl
+++ b/lib/runtime_tools/src/observer_backend.erl
@@ -23,7 +23,7 @@
-export([vsn/0]).
%% observer stuff
--export([sys_info/0, get_port_list/0,
+-export([sys_info/0, get_port_list/0, procs_info/1,
get_table/3, get_table_list/2, fetch_stats/2]).
%% etop stuff
@@ -293,6 +293,23 @@ fetch_stats_loop(Parent, Time) ->
try erlang:memory() catch _:_ -> [] end},
fetch_stats_loop(Parent, Time)
end.
+
+%%
+%% Chunk sending process info to etop/observer
+%%
+procs_info(Collector) ->
+ All = processes(),
+ Send = fun Send (Pids) ->
+ try lists:split(10000, Pids) of
+ {First, Rest} ->
+ Collector ! {procs_info, self(), etop_collect(First, [])},
+ Send(Rest)
+ catch _:_ ->
+ Collector ! {procs_info, self(), etop_collect(Pids, [])}
+ end
+ end,
+ Send(All).
+
%%
%% etop backend
%%