ides (ides v0.2.0)
View SourceBeware the Ides of March — find the supervisors and siblings that could kill your Erlang process.
Given any PID, this module shows:
- Ancestors: the chain of supervisors above the process
- Siblings: all children of the same supervisor
- Kill graph: every process that could cause this PID to be killed
- Restart logic: whether a terminated child will be restarted
- Affected siblings: which siblings a supervisor would kill/restart if this PID dies
Uses OTP primitives: erlang:process_info/2 for $ancestors,
supervisor:which_children/1, and proc_lib:translate_initial_call/1
Summary
Types
-type child_process() :: ides_family:child_process().
-type child_restart_type() :: ides_family:child_restart_type().
-type exit_reason() :: ides_march:exit_reason().
-type kill_source() :: ides_family:kill_source().
-type link_info() :: ides_family:link_info().
-type monitor_info() :: ides_family:monitor_info().
-type process() :: ides_family:process().
-type supervisor_process() :: ides_family:supervisor_process().
-type supervisor_strategy() :: ides_family:supervisor_strategy().
Functions
-spec format_detail(TargetPid :: pid(), Tree :: process(), KillSources :: [kill_source()]) -> iolist().
-spec kill_graph_detail(TargetPid :: pid()) -> {ok, [kill_source()]} | {error, term()}.
-spec monitor_info(Pid :: pid()) -> {ok, monitor_info()} | {error, term()}.
-spec print_detail(TargetPid :: pid(), Tree :: process(), KillSources :: [kill_source()]) -> ok.
-spec should_restart(Pid :: pid(), Reason :: exit_reason()) -> boolean().