dikaio
10/1/2015 - 6:38 AM

Detect all processes that take more than 1MB in memory and log them

Detect all processes that take more than 1MB in memory and log them

require Logger
for pid <- Process.list,
  Process.info(pid, :memory) > {:memory, 1000000} do
  Logger.warn inspect({pid, Process.info(pid)})
end