aboutsummaryrefslogtreecommitdiffstats
path: root/lib/runtime_tools/src/observer_backend.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2017-05-17 15:05:53 +0200
committerDan Gudmundsson <[email protected]>2017-05-17 15:05:53 +0200
commit55424641b4945b435f401f172742fe88d47ce4fb (patch)
tree4f93ec57a322266300a0d16ca31bc557e51b0a83 /lib/runtime_tools/src/observer_backend.erl
parent429c139eb828a7f69db407e924d4639ac86df880 (diff)
parent10f06f0552f581df2afc6b83bcb43f5903a6029c (diff)
downloadotp-55424641b4945b435f401f172742fe88d47ce4fb.tar.gz
otp-55424641b4945b435f401f172742fe88d47ce4fb.tar.bz2
otp-55424641b4945b435f401f172742fe88d47ce4fb.zip
Merge branch 'dgud/observer/chunk-proc-info'
* dgud/observer/chunk-proc-info: observer: Fix alpabetic ordering when sorting on Name observer: Handle crash when node goes down observer: listen on correct notebook change observer: chunk process list info
Diffstat (limited to 'lib/runtime_tools/src/observer_backend.erl')
-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
%%