简体   繁体   中英

What is the regs() equivalent in Elixir?

Just like we use regs(). in the Erlang shell to list all the processes running on BEAM is their an equivalent of this in Elixir or iex?

regs() is a function defined in the c module which is imported into the Erlang shell by default. In Elixir, you can call it using :c.regs() .

iex(1)> :c.regs()

** Registered procs on node nonode@nohost **
Name                  Pid          Initial Call                      Reds Msgs
'Elixir.IEx.Broker'   <0.91.0>     'Elixir.IEx.Broker':init/           34    0
'Elixir.IEx.Config'   <0.90.0>     'Elixir.IEx.Config':handl           80    0
'Elixir.IEx.Pry'      <0.92.0>     'Elixir.IEx.Pry':init/1             36    0
'Elixir.IEx.Superviso <0.89.0>     supervisor:'Elixir.Superv          416    0
...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM