找出消耗内存最多的进程 :
lists:reverse(lists:keysort(2,[{P, erlang:process_info(P, heap_size)} || P <- erlang:processes()])).
找到最消耗内存的ETS表 :
lists:reverse(lists:keysort(2,[{T, ets:info(T, memory)} || T <- ets:all()])).
找出消耗内存最多的进程 :
lists:reverse(lists:keysort(2,[{P, erlang:process_info(P, heap_size)} || P <- erlang:processes()])).
找到最消耗内存的ETS表 :
lists:reverse(lists:keysort(2,[{T, ets:info(T, memory)} || T <- ets:all()])).
转载于:https://www.cnblogs.com/yi220284/p/3635917.html