Notes

System Monitor for Raspberry Pi

Edit on GitHub

Raspberry Pi
3 minutes

RPi-Monitor is a nifty utility that monitors and displays system information about your Raspberry Pi in a nice-looking graphical interface in the browser.
It can show you how much CPU Load you have, what is the temperature of your Raspberry Pi (good to know in cases where you have overclocked the raspberry pi), Used, Free and Total Memroy (RAM), Used, Free and Total Space you have on both partitions of your SD Card, Used, Free and Total SWAP space (Virtual RAM), how long the Raspberry Pi has been running (Uptime), and general information about your Versions (Kernel, Firmware, Processor etc.) as well as any packages that might need updating.
You can see these as stats as well as Graphs.

Installing RPi-Monitor

Download it from the official repository in Github:

sudo wget http://goo.gl/P4Bl6I -O rpimonitor_2.4-1_all.deb

Install the dependencies by executing the following command:

sudo apt-get install librrds-perl libhttp-daemon-perl libjson-perl libipc-sharelite-perl

Install RPi-Monitor using the following command:

sudo dpkg -i rpimonitor_2.4-1_all.deb

Usage

Browse http://RPiIPaddress:8888/ (from another computer or mobile on the same network) to access to the web interface. For example, the IP of my Raspberry Pi is 192.168.2.103, so the link for RPi-Monitor is http://192.168.2.103:8888/
As of now Chrome and Firefox are the recommended browsers to view RPi-Monitor interface.

Auto Refreshing Status Page

By default the status page does not automatically refresh stats, but you can enable that from Configuraion by checking the ‘Auto refresh status page’ option.


[Optional] Changing Default Port (:8888)

You can change the default 8888 port by editing the rpimonitord.conf file in /etc/ directory.

sudo nano /etc/rpimonitord.conf

Uncomment (by removing the # sign) and edit the line that says ‘daemon.port=8889’. Like this:

# daemon.port=8888
# Define port of the web server (default:8888)
daemon.port=1234

where 1234 is my custom port.


[Optional] Monitoring a WiFi Connection

You can also add a WiFi icon to the status page, like I did. Since I use a WiFi adopter with my raspberry pi and not an ethernet cable, it makes sense to be able to monitor WiFi bandwidth and speed. The process of adding the WiFi indicator involves editing the default.conf file in /etc/rpmonitord.conf.d directory.

1sudo nano /etc/rpimonitord.conf.d/default.conf

The snippet to add is:

 1###############################################################
 2# Graph WLAN
 3###############################################################
 4dynamic.17.name=wifi_received
 5dynamic.17.source=/sys/class/net/wlan0/statistics/rx_bytes
 6dynamic.17.regexp=(.*)
 7dynamic.17.postprocess=$1*-1
 8dynamic.17.rrd=DERIVE
 9
10dynamic.18.name=wifi_send
11dynamic.18.source=/sys/class/net/wlan0/statistics/tx_bytes
12dynamic.18.regexp=(.*)
13dynamic.18.postprocess=
14dynamic.18.rrd=DERIVE
15
16web.status.1.content.9.name=WiFi
17web.status.1.content.9.icon=wifi.png
18web.status.1.content.9.line.1="WiFi Sent: <b>"+KMG(data.wifi_send)+"<i class='icon-arrow-up'></i></b> Received: <b>"+KMG(Math.abs(data.wifi_received)) + "<i class='icon-arrow-down'></i></b>"
19
20web.statistics.1.content.9.name=WiFi
21web.statistics.1.content.9.graph.1=wifi_send
22web.statistics.1.content.9.graph.2=wifi_received
23web.statistics.1.content.9.ds_graph_options.net_send.label=Upload bandwidth (bits)
24web.statistics.1.content.9.ds_graph_options.net_send.lines={ fill: true }
25web.statistics.1.content.9.ds_graph_options.net_send.color="#FF7777"
26web.statistics.1.content.9.ds_graph_options.net_received.label=Download bandwidth (bits)
27web.statistics.1.content.9.ds_graph_options.net_received.lines={ fill: true }
28web.statistics.1.content.9.ds_graph_options.net_received.color="#77FF77"

You can read more about how to monitor wifi using rpi-monitor here. The linked article, written by the author of rpi-monitor himself tells how to add a wifi connection and monitor it with rpi-monitor. If you have already configured your WiFi card/connection then ignore the first part about installing the wifi network and proceed to configuring rpi-monitor to show wifi network interface.
You might have to restart your Raspberry Pi in order to see/apply the changes. The command for restart is:

sudo reboot

Documentation

To see instructions on how to use and configure RPi-Monitor, use the following commands:

man rpimonitord

and

man rpimonitord.conf

Man pages are also available in the Github wiki.

Updating RPi-Monitor

Run the following command to upgrade RPi-Monitor:

sudo apt-get update && sudo service rpimonitor update

You will also be able to see this command in the RPi-Monitor web interface when there are upgardes available.

Uninstall / Remove RPi-Monitor

If you would like to uninstall RPi-Monitor, you can do so by entering the following command:

dpkg --purge rpimonitor

Related