# Profiling memory usage in given process

**URL:** <https://forum.elixirforum.com/t/profiling-memory-usage-in-given-process/20878>\
**Category:** Questions\
**Tags:** erlang, beam, profiling\
**Created:** [March 14, 2019, 2:23pm UTC](https://forum.elixirforum.com/t/profiling-memory-usage-in-given-process/20878 "2019-03-14T14:23:12Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![arnomi](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/e95f7d/32.png) [@arnomi](https://forum.elixirforum.com/u/arnomi)\
**Post date:** [March 18, 2019, 11:50am UTC](https://forum.elixirforum.com/t/profiling-memory-usage-in-given-process/20878/14 "2019-03-18T11:50:56Z")

</div>

There are a few things you can do. Observer (and observer\_cli) allow you to inspect what processes are currently doing. In observer\_cli, if you ordered the processes by memory usage and you want to inspect the first one, simply press 1. You can then, for example, inspect the messages of the process or its state.

The same you can do also from iex. To get the state of a process use `sys.get_state(pid)`. And via `Process.info(pid)` (or better `Recon.info(pid)` which disables some of the unsafe inspections) you can look into, for example, current stacktrace, process dictionary, messages etc.

---

_[View the full topic](https://forum.elixirforum.com/t/profiling-memory-usage-in-given-process/20878)._
