Monitoring Raspberry Pi Performance Using Cacti

Monitoring Raspberry Pi Performance Using Cacti

Cacti (http://www.cacti.net/) is a pretty simple tool – it polls a list of devices every 5 minutes and takes measurements of several key performance indicators. The results are stored in data files which are then graphed and presented using a web interface.

Although Cacti is generally speaking a low resource monitoring tool it does use it’s fair share of resources on the Raspberry Pi. For starters Cacti runs on top of both MySQL and Apache.

Installation is simple, just run the following command:

Shell

1

2

3

sudo apt-getinstall cacti

This installs all the dependencies including MySQL, PHP, and Apache.You’ll be prompted to enter a password for the administrator, just pick whatever your password of choice is. The install takes a long time on the Pi so have some light entertainment on hand to keep you entertained whilst the install does it’s thing.

Once it’s done you can access cacti using the URL http://ipaddress/cacti. The default username password combination is admin:admin and you have to change it on first login. Leave the Cacti install for a good 10 to 15 minutes and then check the graphs tab. By default the local linux server is monitored but you need around 15 minutes of data (3 x 5 minute polls) to have some data to graph.

The main graph to watch is the one depicting the load values. There’s a number of ways to interpret the load values but the most straight forward way to look at it is as a percentage on single CPU systems. So a load average of 1.0 is equivalent to the CPU being used all the time (100 percent). A load average of 2 means the CPU is running at 200%. Since the CPU can only run at 100% it means that there’s enough workload outstanding for an additional CPU to be running at 100%. The goal, generally speaking, is to keep the load averages at 1 or below. On my poor little Raspberry Pi the 1 minute load average is constantly above 2 and the 15 minute load average is often over 8.