Skip to content

Instantly share code, notes, and snippets.

@macro
Last active December 14, 2015 16:59
Show Gist options
  • Save macro/5118730 to your computer and use it in GitHub Desktop.
Save macro/5118730 to your computer and use it in GitHub Desktop.
find top 20 registered pids w/ largest msg queues
lists:sublist(lists:reverse(lists:keysort(3, [{N,P,MQ} || N <- registered(), P <- [whereis(N)], is_pid(P), {_, MQ} <- [erlang:process_info(P, message_queue_len)]])), 20).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment