I’ve been using Elixir a ton at work and in some fun side projects and I’m absolutely in love with it.
One tool I especially love is the Erlang Observer tool, that shows you IO, memory, and CPU usage used by your app and the Erlang VM.
I’m going to monitor a Phoenix app in this quick blog post.
First, fire up your Phoenix server on say, a VPS, giving it a node name:
iex --name email@example.com --cookie jbavari -S mix phoenix.server
Then on your remote viewing machine, say your Mac, run the following:
iex --name firstname.lastname@example.org --cookie jbavari
Now we’re set up to do some remote observations!
:observer.start on your local machine, which should open up the Erlang observer.
Now from the menu, select ‘Nodes’, then you should see your node there. If not, click the connect to node button, type in your
email@example.com node address and you should be able to view your node via the observer!