Created
April 3, 2022 23:56
-
-
Save arcusfelis/2fc38093e26a70c4b43c729385c635ef to your computer and use it in GitHub Desktop.
debug erlang message queues in mongooseim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rp(lists:reverse([{Len, case erlang:process_info(TopPid, registered_name) of {_,X} -> X; _ -> TopPid end, erlang:process_info(TopPid, current_stacktrace)} || {Len, TopPid} <- lists:sublist(lists:reverse(lists:keysort(1, [{try element(2,erlang:process_info(Pid, message_queue_len)) + proplists:get_value('$internal_queue_len', element(2, erlang:process_info(Pid, dictionary)), 0) catch _:_ -> -1 end, Pid} || Pid <- erlang:processes()])), 20)])). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment