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.
Briefly follows what happened during my test:
paolo@ubuntu:~/cowboy_examples$ ./start.sh Eshell V5.9 (abort with ^G) (cowboy_examples@ubuntu)1> The following examples are available: * Hello world: http://localhost:8080 * Websockets: http://localhost:8080/websocket * Eventsource: http://localhost:8080/eventsource (cowboy_examples@ubuntu)1>
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:
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:
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!