4

I need to do some stress testing on some raspberry pi's and I'm trying to setup monitoring tools to detect which resource is the bottleneck in various scenarios.
I'd like to monitor network, disk, memory & cpu.

RPI-monitor seems to do disk, memory & cpu out of the box but requires some configuration to monitor the network.

But it's unclear from the doc exactly how to display bandwidth utilization. Currently I'm using wifi but I'd like to be able to experiment with ethernet cable as well.

The rpimonitord man page mentions /etc/rpimonitor/data.conf.
This file includes others like

  • include=/etc/rpimonitor/template/network.conf
  • include=/etc/rpimonitor/template/wlan.conf

network.conf seems to be for ethernet. This is displayed on the monitoring web page:

enter image description here

wlan.conf seems to be for wifi. including wlan.conf only displays bytes in and out like so.

enter image description here

I found a sample wlan.conf file that might meet my needs here but it doesn't the display is the same.

########################################################################
# Graph WLAN
########################################################################

dynamic.17.name=wifi_received
dynamic.17.source=/sys/class/net/wlan0/statistics/rx_bytes
dynamic.17.regexp=(.*)
dynamic.17.postprocess=$1*-1
dynamic.17.rrd=DERIVE

dynamic.18.name=wifi_send
dynamic.18.source=/sys/class/net/wlan0/statistics/tx_bytes
dynamic.18.regexp=(.*)
dynamic.18.postprocess=
dynamic.18.rrd=DERIVE

web.status.1.content.9.name=WiFi
web.status.1.content.9.icon=wifi.png
web.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>"

web.statistics.1.content.9.name=WiFi
web.statistics.1.content.9.graph.1=wifi_send
web.statistics.1.content.9.graph.2=wifi_received
web.statistics.1.content.9.ds_graph_options.net_send.label=Upload bandwidth (bits)
web.statistics.1.content.9.ds_graph_options.net_send.lines={ fill: true }
web.statistics.1.content.9.ds_graph_options.net_send.color="#FF7777"
web.statistics.1.content.9.ds_graph_options.net_received.label=Download bandwidth (bits)
web.statistics.1.content.9.ds_graph_options.net_received.lines={ fill: true }
web.statistics.1.content.9.ds_graph_options.net_received.color="#77FF77"

Ultimately I just want an accurate measure of bandwidth utilization. If I can get this tool to display that, that would be great. If there is another tool which can be used, that would be great too.

3
  • Just curious. Do you know if iperf3 can be used to test the performance throughput of a network connection?
    – user91822
    Commented Oct 12, 2018 at 3:27
  • yes. I ended up using iperf and it worked very nicely to accurately identify the upper bound of the throughput. on my mac I ran: iperf -s -u; on my pi I ran: iperf -c 172.16.0.10 -r -u -b 100M; gradually increasing the last parameter until packet loss was observed.
    – Alex Ryan
    Commented Oct 12, 2018 at 7:10
  • Between my debian Linux desktop computer and my Rpi0 (as an iperf3 server hosted on a Seagate Dockstar), the throughput can be as high as 101 Mbps. However, from my Rpi (as a client hosted on a Seagate Dockstar) to the same Linux desktop computer, thr throughput is about 73 Mbps. I don't know why there is such a huge difference in the throughputs.
    – user91822
    Commented Oct 12, 2018 at 12:40

2 Answers 2

2
  1. Edit the file /etc/rpimonitor/template/network.conf

    a. Comment those lines you want to left out (eg "To activate network monitoring ..." by inserting a # in front of the line.

    b. Comment out those lines you want to view (eg "web.status.1.content.8.line.1="Ethernet Sent... ") by deleting the # in front of the line.

  2. Restart the service by executing the following command

    sudo service rpimonitor restart
    
0

Probably worth to mentions this page :

https://xavierberger.github.io/RPi-Monitor-docs/31_configuration_examples.html

Collecting metrics

dynamic.1.name=wifi_received
dynamic.1.source=/sys/class/net/wlan0/statistics/rx_bytes
dynamic.1.regexp=(.*)
dynamic.1.postprocess=$1*-1
dynamic.1.rrd=DERIVE

dynamic.2.name=wifi_send
dynamic.2.source=/sys/class/net/wlan0/statistics/tx_bytes
dynamic.2.regexp=(.*)
dynamic.2.postprocess=
dynamic.2.rrd=DERIVE

Add status

web.status.1.content.1.name=WiFi
web.status.1.content.1.icon=wifi.png
web.status.1.content.1.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>"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.