Skip to content

Instantly share code, notes, and snippets.

@lemenkov
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save lemenkov/ea2820df27c2ec6d37a8 to your computer and use it in GitHub Desktop.

Select an option

Save lemenkov/ea2820df27c2ec6d37a8 to your computer and use it in GitHub Desktop.
Find a memory consuming task(s) in Erlang
/usr/bin/erl -setcookie <secretcookie> -sname test@example-com -remsh rabbit@example-com
lists:reverse(lists:keysort(1, [fun(P) -> {memory, M} = erlang:process_info(P, memory), {M, P} end (Pid) || Pid <- erlang:processes()])).
# http://levgem.livejournal.com/261075.html?nojs=1
# https://azunyanmoe.wordpress.com/2011/04/01/getting-process-information-of-erlang-runtime-system/
# http://www.erlang.org/doc/efficiency_guide/profiling.html
# http://www.erlang.org/doc/man/eprof.html
# http://www.erlang.org/doc/apps/tools/fprof_chapter.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment