Processes in Iex

The Elixir iex shell is a very powerful tool in itself.

I have recently found a trick that makes it much easier to use. If you get stuck in a line that you just can’t complete just type :break + return and it will cancel that line.

This is an investigation of what you get out of the box.

Lets start with the processes that exist in an empty iex session:

iex > Process.list |> Enum.count
56 
Process.registered |> Enum.count
33

That means that there are 33 named processes started with iex and 23 anonymous ones.

Here are the named ones:

Elixir.IEx.Broker - GenServer, communicates with other components.
Elixir.IEx.Config - Agent, handles .iex.config file
Elixir.IEx.Pry - GenServer, Handles Pry debugging
Elixir.IEx.Supervisor - Supervisor for the above three Services.
Elixir.Logger, Service for logging, works with logger.
Elixir.Logger.BackendSupervisor, Supervises the backend for the logger
Elixir.Logger.Supervisor - Supervisor for the logger components
application_controller - GenServer, handles loaded applications
code_server - Erlang code server
elixir_code_server - GenServer that manages loaded code in ets
elixir_config - GenServer that stores config in ets
elixir_sup - Supervisor for the above two GenServers
erl_prim_loader
erl_signal_server
erts_code_purger
file_server_2
global_group
global_name_server
inet_db
init
kernel_refc
kernel_safe_sup
kernel_sup
logger - Erlang logger service, used by Elixir.Logger
logger_handler_watcher
logger_proxy
logger_sup
rex
socket_registry
standard_error
standard_error_sup
user
user_drv

We have the following applications loaded:

iex > :application_controller.loaded_applications
[
  {:logger, 'logger', '1.10.4'},
  {:iex, 'iex', '1.10.4'},
  {:compiler, 'ERTS  CXC 138 10', '7.6.2'},
  {:elixir, 'elixir', '1.10.4'},
  {:stdlib, 'ERTS  CXC 138 10', '3.13'},
  {:kernel, 'ERTS  CXC 138 10', '7.0'}
]

You can find out more using :observer.start
This is the Elixir Application Tree
Here is the IEx Application Tree
This is the Elixir Logger Supervisor tree
Here is the Erlang Kernel supervisor tree

These cover 43 of the Processes

I have 13 to track down.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s