How to show all processes in Erlang?

后端 未结 4 835
说谎
说谎 2021-02-13 03:58

I need get all registered process. I input register(). a

 mnesia_event,kernel_safe_sup,mnesia_monitor,mnesia_snmp_sup,
 mnesia_recover,mnesia_late_l         


        
相关标签:
4条回答
  • 2021-02-13 04:06

    > rp(registered()). Documentation here

    0 讨论(0)
  • 2021-02-13 04:15

    I believe the easiest way is:

    > io:write(registered()).
    
    0 讨论(0)
  • 2021-02-13 04:20

    registered() is returning all the processes, but the shell is truncating output.

    you can print the result to see everything:

    io:format("~p~n", [registered()]).
    
    0 讨论(0)
  • 2021-02-13 04:29

    As long as your are in shell you can use regs():

    1> regs().
    
    ** Registered procs on node nonode@nohost **
    Name                  Pid          Initial Call                      Reds Msgs
    application_controlle <0.33.0>     erlang:apply/2                   65717    0
    code_server           <0.38.0>     erlang:apply/2                  592348    0
    disk_log_server       <0.129.0>    disk_log_server:init/1             323    0
    disk_log_sup          <0.128.0>    supervisor:disk_log_sup/1          367    0
    dtls_connection_sup   <0.70.0>     supervisor:dtls_connectio           84    0
    dtls_udp_sup          <0.71.0>     supervisor:dtls_udp_sup/1           81    0
    erl_prim_loader       <0.6.0>      erlang:apply/2                24923843    0
    erl_signal_server     <0.46.0>     gen_event:init_it/6                 51    0
    ...
    
    ** Registered ports on node nonode@nohost **
    Name                  Id              Command
    ok
    
    0 讨论(0)
提交回复
热议问题