I need get all registered process. I input register().
a
mnesia_event,kernel_safe_sup,mnesia_monitor,mnesia_snmp_sup,
mnesia_recover,mnesia_late_loader,mnesia_kernel_sup,inet_db,
rex,kernel_sup,global_name_server,mnesia_checkpoint_sup,
file_server_2,user,error_logger,global_group,mnesia_locker,
standard_error_sup,popd_listener_sup,pop_fsm_sup,dets_sup,
smtpd_listener_sup,disk_log_sup,disk_log_server,dets|...]
How can i get all names registered process, without | ...]
(truncation)?
Thank you.
Erlang processes are lightweight, operate in (memory) isolation from other processes, and are scheduled by Erlang's Virtual Machine (VM). The creation time of process is very low, the memory footprint of a just spawned process is very small, and a single Erlang VM can have millions of processes running.
Every process in Erlang is identified by a unique process identifier (pid). The function self/0 returns the process identifier of the running process. Erlang processes can be created with any of the following functions: spawn, spawn link, spawn monitor, spawn opt, etc.
spawn() creates a new process and returns the pid. The new process starts executing in Module:Name(Arg1,...,ArgN) where the arguments are the elements of the (possible empty) Args argument list.
A process can terminate itself by calling one of the BIFs exit(Reason), erlang:error(Reason), erlang:error(Reason, Args), erlang:fault(Reason) or erlang:fault(Reason, Args). The process then terminates with reason Reason for exit/1 or {Reason,Stack} for the others.
> rp(registered()).
Documentation here
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()]).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With