Installing Device Agent on Raspberry Pi (RPi)

You can install the ThousandEyes Device Agent on a Raspberry Pi by following the instructions mentioned below.

Supported Platforms

  • The device agent can be installed on Raspberry Pi 3 and above, including models such as 3B+, 4, 5, and higher.

The Raspberry Pi 3 has an Ethernet connection limited to 300 Mbps, which may not be sufficient to test maximum speeds on many internet connections.

Pre-requisites

  1. A Raspberry Pi (and power adaptor)

  2. A MicroSD card

  3. A computer with a microSD card reader

  4. A method for entering commands on the RPi console. This could be:

    • Keep the Raspberry Pi on the same network segment as your computer and use SSH for remote console access.

    • Having a screen, keyboard, and mouse ready to connect to the Raspberry Pi.

  5. The client string for your account - please ask your account manager.

  6. A link to download the RPi agent image - please ask your account manager.

Device Agent Installation

  1. Using the official Raspberry Pi Imager, create a microSD card with Raspberry Pi OS. Note: You do not need a desktop environment.

  2. Get the installation archive onto the Raspberry Pi -

    • If you are using a keyboard/video/mouse setup, then you can navigate to the download you were shared on Box.com and download it directly.

    • Or else, use SSH.

      • Enable SSH with a username and password in the advanced options, and choose a memorable hostname for your Pi. Note: If you are using the default SSH credentials, then your username is pi and you should change the password.

      • Download the package from Box.com and then copy it across with the following scp command:

           scp sk_router_agent-*-rpi.tar.gz <username>@<rpi-hostname-or-IP-address>:
      • On your device console, run the following commands:

        a. tar -xf sk_router_agent-*-rpi.tar.gz

        b. sudo apt install ./sk-router-agent_*_armhf.deb

  3. Wait for the agent to install, and when prompted, enter the client string provided.

  4. Upon successful installation on the Raspberry Pi, the Device Agent will be running under systemd as samknows.service.

The Raspberry Pi agent (sk-router-agent_*_armhf.deb) is configured to start automatically upon device boot, ensuring continuous operation. If you are not receiving measurement results, verify that the Raspberry Pi is powered on and operating.

You can review historical logs using journalctl -u samknows.service, or follow them live with journalctl -u samknows.service -f. The agent will log the unitId.

For example:


[2023-10-24 15:23:37.733] [trace] [task_runner] [2659] Metadata payload: {"agent":{"unit_id":1194???186},"metadata":{"custom":{"model":" Raspberry Pi 3 Model B Rev >

You can also check the unit ID by executing the following command:

cat /var/run/opt/samknows/router_agent/unitid.

Raspberry PI Network Location

The Device Agent on your Raspberry Pi does not support cross-traffic detection and can be placed anywhere within your LAN without needing a direct connection to the router. However, for the most accurate speed test results, it is recommended to connect it directly to the router. For example, if the Device Agent is placed behind a powerline extender, its speed will be limited by that device.

Device Registration

If you entered the client string correctly, your device will automatically register to your ThousandEyes account. If it doesn’t appear, contact your account manager and provide the Unit ID.

The client string sets the default testing parameters and enables features like hourly speed and jitter tests, or RealSpeed.

To view the current test schedule, including when the next tests will be conducted, run the following command: /opt/samknows/router_agent/bin/skagent -S.

If the output appears empty, you will need to adjust your test configuration. Please consult your account manager for assistance.

Last updated