ObserverWeb.Apps.Process (Observer Web v0.2.4)

View Source

Retrieve process links and information

References:

Summary

Functions

Creates a complete overview of process stats based on the given pid.

Types

t()

@type t() :: %{
  pid: pid(),
  registered_name: atom() | nil,
  priority: :low | :normal | :high | :max,
  trap_exit: boolean(),
  message_queue_len: non_neg_integer(),
  error_handler: module() | :none,
  relations: %{
    group_leader: pid() | nil,
    ancestors: [pid()],
    links: [pid()] | nil,
    monitored_by: [pid()] | nil,
    monitors: [pid() | {module(), term()}] | nil
  },
  memory: %{
    total: non_neg_integer(),
    stack_and_heap: non_neg_integer(),
    heap_size: non_neg_integer(),
    stack_size: non_neg_integer(),
    gc_min_heap_size: non_neg_integer(),
    gc_full_sweep_after: non_neg_integer()
  },
  meta: %{
    init: String.t(),
    current: String.t(),
    status:
      :running
      | :waiting
      | :exiting
      | :garbage_collecting
      | :suspended
      | :runnable,
    class: :supervisor | :application | :unknown | atom()
  },
  state: String.t(),
  dictionary: keyword() | nil,
  phx_lv_socket: Phoenix.LiveView.Socket.t() | nil
}

Functions

info(pid, timeout \\ 100)

@spec info(pid :: pid(), timeout :: non_neg_integer()) :: :undefined | t()

Creates a complete overview of process stats based on the given pid.

state(pid, timeout \\ 100)

@spec state(pid :: pid(), timeout :: non_neg_integer()) ::
  {:ok, any()} | {:error, String.t()}