BigWig: A better Erlang webtool (spawnfest entry)Published on 11 July 2011
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
Our project, called BigWig, is a modern suite of web-based tools that we hope will eventually supercede webtool, appmon and the rest.
Our version of etop, a realtime-updating, sortable process list:
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.
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:
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.
All on github here: BigWig for Erlang. Licensed the same as Erlang/OTP.
Check the readme - installing and running is easy!
Recent 10 Articles
- BigWig: A better Erlang webtool (spawnfest entry)
- Erlang rebar tutorial: generating releases and upgrades
- Erlang/OTP releases: rebar, release_handler, .appup, etc
- Rewriting Playdar: C++ to Erlang, massive savings
- Erlang talk at London Hackspace
- Anti-RDBMS: A list of distributed key-value stores
- How we use IRC at Last.fm
- Getting to know ejabberd and writing modules
- ssh hack: connect directly to machine via a firewall box
- A Million-user Comet Application with Mochiweb, Part 3
[ See all 18 articles ]