Hexnut – Software

Hello World

This post discusses the software used in the Hexnut robot.

The primary computation is performed by a Raspberry Pi.

I started with a freshly installed Debian Wheezy release that had been updated and upgraded.


The first thing I wanted was a way to collect (and eventually monitor) statistics about the system. For this I decided to use collectd

$ sudo apt-get install collectd

The syslog starting showing many errors related to rrdtool that looked like this:

rrdtool plugin ... failed ... illegal attempt to update using time ... when last update time is ... (minimum one second step)

So I edited the collectd configuration to disable all plugins. I will enable the plugins as they are needed.

graphite and carbon

I want to use graphite to display the statistics. I installed graphite-carbon using:

$ sudo apt-get install graphite-carbon

I tried installing graphite-web in the same way, but the package wasn’t found:

$ sudo apt-get install graphite-web
E: Unable to locate package graphite-web

I looked at the graphite-web documentation and it suggested using virtualenv and pip to install graphite-web.

To do that I first needed to install the python-virtualenv package for python 2.7.3

$ sudo apt-get install python-virtualenv

I then created a virtualenv for graphite and activated it:

$ sudo virtualenv /opt/graphite
$ sudo source /opt/graphite/bin/activate

I then was able to install graphite-web using

(graphite)$ sudo pip install https://github.com/graphite-project/ceres/tarball/master
(graphite)$ sudo pip install whisper
(graphite)$ sudo pip install carbon
(graphite)$ sudo pip install graphite-web

Hexnut – Cheatsheet

This is a cheatsheet of information and commands used with the Hexnut project.

Debian and bash


$ sudo reboot

Update and Upgrade Debian packages

$ sudo apt-get update
$ sudo apt-get upgrade

List all processes

$ ps aux

View the syslog

$ tail /var/log/syslog


Restart the server

$ sudo service apache2 restart

View the error log

$ tail /var/log/apache2/error.log -n 10


Check process status

$ ps aux | grep collectd

Get help for collectd

$ collectd -h    

View and edit the collectd configuration

$ sudo nano /etc/collectd/collectd.conf

Restart the collectd daemon

$ sudo /etc/init.d/collectd restart


View the carbon configuration

$ sudo nano /etc/carbon/carbon.conf

Get the status of the carbon daemon

$ carbon-cache --config=/etc/carbon/carbon.conf status

Start the carbon daemon

$ sudo carbon-cache --config=/etc/carbon/carbon.conf start


Use postgres

$ sudo -u postgres psql

List help

postgres-# \h

List databases

postgres-# \l


View RabbitMQ Management

username: guest
password: guest


View whisper commands

$ ls /usr/bin | grep whisper