Home > English, Erlang > If your Appmon doesn’t work on Ubuntu, maybe….

If your Appmon doesn’t work on Ubuntu, maybe….

A couple of days ago, I re-installed Ubuntu on my laptop. Everything went smoothly, so I decided to install all the common software/tools I use for my Erlang related coding (e.g. erlang itself, emacs, erlang emacs mode and so forth).

I was rather satisfied by my setup, but I tought it was a good idea to test some Erlang applications, just to be sure that everything was really in place.

Lately I have been working with Cowboy, so I decided to test cowboy_examples which is an application used to understand more some of Cowboy features (e.g. websockets support).

Briefly follows what happened during my test:

paolo@ubuntu:~/cowboy_examples$ ./start.sh
Eshell V5.9 (abort with ^G)

The following examples are available:
* Hello world: http://localhost:8080
* Websockets: http://localhost:8080/websocket
* Eventsource: http://localhost:8080/eventsource

So far, so good I tought…but sadly I was wrong. In fact there is an Erlang tool which I use very often when I do some Erlang development: Appmon. As written in the official documentation, Appmon is: “a graphical tool that shows an overview of all applications on all known nodes, and it is possible to view the process tree for an application running on any of the nodes.”  

IMHO Appmon is very cool,  therefore when I saw that cowboy_examples was working (no crash in shell and connection established with web page) I decided to deep a little deeper and tried to lunch Appmon inside the Erlang node:

(cowboy_examples@ubuntu)1> appmon:start().

but the shell hanged and Appmon didn’t start at all. I was really puzzled at the beginning, but then I remembered I had to face this problem other times in the past. How did I solve it? Well, maybe you don’t know that Appmon requires TCL/TK in order to work. So I went to my shell and I typed:

paolo@ubuntu:~/cowboy_examples$ sudo apt-get install tk
paolo@ubuntu:~/cowboy_examples$ sudo apt-get install tcl

After this, I restarted cowboy_examples and tried again to start Appmon, achieving the result shown in the picture below:

Appmon running happily

One thing about Appmon: it has been superseded by the Observer application, therefore it will be removed in Erlang R16. Maybe we had better to learn Observer as well 🙂

That’s all folks!

Categories: English, Erlang Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: