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

sudo apt install agnostics

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 thought on “Raspberry Pi MicroSD Check Using Agnostics via CLI (Raspberry Pi)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.