Raspberry Pi MicroSD Check Using Agnostics via CLI (Raspberry Pi)

Towards the beginning of March 2020 raspberrypi.org released a tool to check the speed of a microSD card being used by the Raspberry Pi. The details for this tool, called “agnostics” can be found at https://www.raspberrypi.org/blog/sd-card-speed-test/ or if you want to install the tool then use sudo apt install agnostics . You may need to sudo apt update first.

sudo apt install agnostics
sudo apt install agnostics

Once installed agnostics is generally run from the “Accessories” part of Raspbian’s main menu. However it can also be used via the terminal / command line by accessing it in the /usr/share/agnostics directory.

geektechstuff_raspberry_pi_agnostics_2
/usr/share/agnostics directory

The /usr/share/agnostics directory contains 2 files and a directory:

  • sd_bench.fio (a file)
  • sdtest.sh (a file)
  • ui (a directory)

Originally I attempted to run the shell script (.sh file) using bash via bash sdtest.sh however this generated a return error that stated; “line 34: return: can only ‘return’ from a function or sourced script”.

geektechstuff_raspberry_pi_agnostics_3
The Line 34 return error – which was because I ran the shell file incorrectly.

The correct method is to use sh sdtest.sh which should show the some results without the line 34 error.

geektechstuff_raspberry_pi_agnostics_4
sh sdtest.sh

 

raspberrypi.org does note that older cards (or cards that have been in use) may generate a fail.

 

One response to “Raspberry Pi MicroSD Check Using Agnostics via CLI (Raspberry Pi)”

  1. dstat – Viewing Linux Under The Hood (Linux) – Geek Tech Stuff Avatar

    […] below is an example of using dstat whilst a program (in this case the Raspberry Pi Agnostic tool) is […]

    Like

Welcome to GeekTechStuff

my home away from home and where I will be sharing my adventures in the world of technology and all things geek.

The technology subjects have varied over the years from Python code to handle ciphers and Pig Latin, to IoT sensors in Azure and Python handling Bluetooth, to Ansible and Terraform and material around DevOps.

Let’s connect