BigWig: A better Erlang webtool (spawnfest entry)

Written on 11 July 2011

This weekend, Steve, Hunter, Paul and I took part in Spawnfest, a 48-hour Erlang programming event.

Our team name was SMELLS LIKE BEAM SPIRIT. Here we are on Sunday evening:

What a bunch of tools...

The Erlang VM lets you inspect all aspects of a running node, examine running processes, explore process hierarchies, and profile running systems. This is typically done from the Erlang console, but if you're feeling especially nostalgic, you can start Erlang's appmon (a real GUI app), or "webtool", a web-based version of some of the tools:

Erlang's Webtool and Appmon


BigWig

Our project, called BigWig, is a modern suite of web-based tools that we hope will eventually supercede webtool, appmon and the rest.

Processes (etop)

Our version of etop, a realtime-updating, sortable process list:

Process Info

Click on a process ID anywhere in the app, and you get a process info dialog, where you can see the state of the process, kill it and send messages:

Application Explorer (appmon)

Explore the application supervison-tree hierarchy in style. You can click around and more nodes are loaded in on-demand, and changes are sent to the page updating the graph as they happen:

SASL Report Browser

This one isn't quite finished yet, but is intended to be a nice way to browse SASL reports instead of report browser (rb.erl).

We opted to read the existing SASL binary dir format, instead of installing our own event handler that logged reports differently. This was probably a mistake, since logmfh handler and rb.erl are pretty dated, and designed specifically to render reports as text to stdout. At the moment we do install a custom event handler, but only so we can stream new reports to the browser as they happen.

We'll tidy it up, but ultimately I think we should be installing our own event handler and storing reports in a nicer way - possibly couch, or even just update the code to use disk_log, and separate out the rendering bits.

Dashboard

Shows the list of installed and loaded applications, which releases are installed, according to release_handler, and details about the VM.

We ran out of time at the weekend, so you just see the JSON for now:

BigWig Architecture

We used cowboy as our webserver, and make extensive use of websockets. For example, those sparkline graphs and metrics in the left sidebar are pushed to the page, and updated every couple of seconds.

At the moment, BigWig only inspects the node it is currently running on. The plan is to make it start up as a hidden node, and let you specify which nodes to monitor by providing a nodename and cookie.

Source Code

All on github here: BigWig for Erlang. Licensed the same as Erlang/OTP.

Check the readme - installing and running is easy!


This article was written on: 11 July 2011
Tagged as:
blog comments powered by Disqus