aboutsummaryrefslogtreecommitdiffstats
path: root/lib/runtime_tools/src/observer_backend.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/runtime_tools/src/observer_backend.erl')
-rw-r--r--lib/runtime_tools/src/observer_backend.erl15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl
index 202129c61a..68ef04f20c 100644
--- a/lib/runtime_tools/src/observer_backend.erl
+++ b/lib/runtime_tools/src/observer_backend.erl
@@ -53,6 +53,13 @@ sys_info() ->
Mem -> Mem
catch _:_ -> []
end,
+
+ SchedulersOnline = erlang:system_info(schedulers_online),
+ SchedulersAvailable = case erlang:system_info(multi_scheduling) of
+ enabled -> SchedulersOnline;
+ _ -> 1
+ end,
+
{{_,Input},{_,Output}} = erlang:statistics(io),
[{process_count, erlang:system_info(process_count)},
{process_limit, erlang:system_info(process_limit)},
@@ -60,9 +67,13 @@ sys_info() ->
{run_queue, erlang:statistics(run_queue)},
{io_input, Input},
{io_output, Output},
+
{logical_processors, erlang:system_info(logical_processors)},
- {logical_processors_available, erlang:system_info(logical_processors_available)},
{logical_processors_online, erlang:system_info(logical_processors_online)},
+ {logical_processors_available, erlang:system_info(logical_processors_available)},
+ {schedulers, erlang:system_info(schedulers)},
+ {schedulers_online, SchedulersOnline},
+ {schedulers_available, SchedulersAvailable},
{otp_release, erlang:system_info(otp_release)},
{version, erlang:system_info(version)},
@@ -221,7 +232,7 @@ fetch_stats_loop(Parent, Time) ->
_M = Parent ! {stats, 1,
erlang:statistics(scheduler_wall_time),
erlang:statistics(io),
- erlang:memory()},
+ try erlang:memory() catch _:_ -> [] end},
fetch_stats_loop(Parent, Time)
end.
%%