What is the best erlang approach to being able to identify process identities from your process id?

When I debug, I usually look at about 5,000 processes, each of which can be one of about 100 gen_servers, fsms, etc. If I want to know THAT is an erlang process, I can do:

process_info(pid(0,1,0), initial_call).

And get a result like:

{initial_call,{proc_lib,init_p,5}}

... which is almost useless.

Most recently, I hit on the idea of ​​(becoming attached) to the registration of each process with a name that told me that this process was presented. For example, player_1150 is a gameplay that introduces player 1150. Yes, I end up making a couple million atoms over a weekly run. (And I would like to hear comments about the drawbacks of increasing the limit to 10,000,000 atoms, when my system works with about 8 GB of unused real memory, if any.) This meant that I could on the console of a live system, request all processes how long their message queue, find the top intruders, then check if these processes are registered and printed the atom on which they were registered.

: node . 3 ; player_1158, player_1158_deprecating, player_1158_replacement. , , , , , - , , . , , , , (, ), , - .

. ets, :

ets:insert(self(), {player, 1158}).

, . ( ), - , ets.

, . , , , process_info.

, , , , , . , , . - , ( " " ?) .

+5
2

gproc, .

, ( erlang). gproc , .

+3

gen_server gen_fsm, , handle_info . {get_info, ReplyPid}, , , .. , .


Isac ,

+1

All Articles