npaisnel
Posts: 230
Joined: Sun Aug 05, 2018 4:23 pm

SD Card - Diagnostics

Fri Jun 18, 2021 5:01 am

I am guessing my failure to bring up a result for this via search is more due to my inability to find a suitable search term and my poor use of “ “. and. +. to create a better search, so here goes...

I see on the Desktop version of latest image there is a Raspberry Diagnostics icon that brings up an SD card read/ write speed test


What is the CLI equivalent if there is one ?

Thanks

RonR
Posts: 2284
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: SD Card - Diagnostics

Fri Jun 18, 2021 7:35 am

The executable is /usr/bin/agnostics, but it won't run in an SSH session. It requires a GUI desktop environment. You can launch it from a GUI desktop terminal window, but it will simply launch the same window that you get using the desktop menu/icon.

npaisnel
Posts: 230
Joined: Sun Aug 05, 2018 4:23 pm

Re: SD Card - Diagnostics

Fri Jun 18, 2021 8:00 am

So what you are saying is that for a lite install with no desktop environment it cant be used?

RonR
Posts: 2284
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: SD Card - Diagnostics

Fri Jun 18, 2021 8:07 am

npaisnel wrote:
Fri Jun 18, 2021 8:00 am
So what you are saying is that for a lite install with no desktop environment it cant be used?

Correct.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 6329
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: SD Card - Diagnostics

Fri Jun 18, 2021 8:28 am

RonR wrote:
Fri Jun 18, 2021 8:07 am
npaisnel wrote:
Fri Jun 18, 2021 8:00 am
So what you are saying is that for a lite install with no desktop environment it cant be used?

Correct.
Which, given that its purpose is to assess (give an indication of) a uSD card's "usability"/performance for use in a desktop environment ** is, perhaps, not unreasonable. There are other, generic, simple "speed tests" for "storage devices" eg. http://www.cpmspectrepi.uk/raspberry_pi ... sting.html for USB-based storage.
Trev.
** Strictly-speaking for the P4B, P400 and, maybe, CM4 setups only (older Pi's and, esp. the P0's, most often used for lite installs may be "slow" in "themselves" and the results less significant.)
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B, B+, and a A+) but Buster on the P3B+, P4B's & P400. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
bensimmo
Posts: 5370
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: SD Card - Diagnostics

Fri Jun 18, 2021 8:54 am

but I use it at the command line and don't use it from the desktop ?
if i remember correctly it's something like
sh /usr/share/agnostics/sdtest.sh

it is a shell script. The GUI just displays the info from it.



EDIT to add, I ran it on Windows10 before (in WSL2 Debian, with the RasPiOS repositories added)

npaisnel
Posts: 230
Joined: Sun Aug 05, 2018 4:23 pm

Re: SD Card - Diagnostics

Fri Jun 18, 2021 12:55 pm

Hi Trev, thanks for the link to the other one,., I'll take a look.
FTrevorGowen wrote:
Fri Jun 18, 2021 8:28 am

Which, given that its purpose is to assess (give an indication of) a uSD card's "usability"/performance for use in a desktop environment ** is, perhaps, not unreasonable. There are other, generic, simple "speed tests" for "storage devices" eg. http://www.cpmspectrepi.uk/raspberry_pi ... sting.html for USB-based storage.
Trev.

The link I found it from on the Desktop version "Start" Button menu did not give the impression that you say..maybe its purpose is as you say , but it does nto really give that indication for the menu item name..

It is labelled as "Raspberry Pi Diagnostics" When I clicked on the link, I was a little disappointed to find only a SD card speed test .. The Phrase Raspberry Pi Diagnostics did rather make me expect a suite of little apps to test various parameters fo the Pi..not jsut a speed test of the SD


The info from bensimmo, is what i needed..yes, it works form the command line...but only on a desktop machine

Copy across to a desktop free bull and it does nto run
bensimmo wrote: but I use it at the command line and don't use it from the desktop ?
if i remember correctly it's something like
sh /usr/share/agnostics/sdtest.sh
Yes that was exactly it..

Copying the files across to a headless machine it does not run though ...

Code: Select all

pi@rsp1a-rsp-tcp:~/pishare $ sh sdtest.sh
Run 1
sdtest.sh: 7: sdtest.sh: fio: not found

sdtest.sh: 13: [: Illegal number: 
Sequential write speed  KB/sec (target 10000) - PASS
sdtest.sh: 20: [: Illegal number: 
Random write speed  IOPS (target 500) - PASS
sdtest.sh: 26: [: Illegal number: 
Random read speed  IOPS (target 1500) - PASS
pi@rsp1a-rsp-tcp:~/pishare $ ls -l
total 12
-rw-r--r-- 1 pi pi  690 Jun 18 13:45 sd_bench.fio
-rw-r--r-- 1 pi pi 1406 Jun 18 13:42 sdtest.sh
drwxrwxrwx 2 pi pi 4096 Jun 18 13:50 ui
pi@rsp1a-rsp-tcp:~/pishare $ 

npaisnel
Posts: 230
Joined: Sun Aug 05, 2018 4:23 pm

Re: SD Card - Diagnostics

Fri Jun 18, 2021 1:03 pm

Installing on a headless Desktop free machine ..it does actually run fine ..jsut seems to do a single test.

Code: Select all

sudo apt install agnostics

Code: Select all

pi@rsp1a-rsp-tcp:~/pishare $ sh /usr/share/agnostics/sdtest.sh
Run 1
prepare-file;0;0;13073;25
seq-write;0;0;11181;21
rand-4k-write;0;0;3057;764
rand-4k-read;7065;1766;0;0
Sequential write speed 11181 KB/sec (target 10000) - PASS
Random write speed 764 IOPS (target 500) - PASS
Random read speed 1766 IOPS (target 1500) - PASS
pi@rsp1a-rsp-tcp:~/pishare $ 

User avatar
bensimmo
Posts: 5370
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: SD Card - Diagnostics

Fri Jun 18, 2021 1:44 pm

It only repeats tests if it fails any of the four.
It repeats u til it passes all four or fails three times.

npaisnel
Posts: 230
Joined: Sun Aug 05, 2018 4:23 pm

Re: SD Card - Diagnostics

Fri Jun 18, 2021 2:12 pm

Yes , I noticed that after examining the script.


Thanks for the tip

ejolson
Posts: 7615
Joined: Tue Mar 18, 2014 11:47 am

Re: SD Card - Diagnostics

Fri Jun 18, 2021 2:52 pm

bensimmo wrote:
Fri Jun 18, 2021 1:44 pm
It only repeats tests if it fails any of the four.
It repeats u til it passes all four or fails three times.
Why does the SD card test repeat on failure rather than success?

My experience is that a substandard or failing SD card quickly gets worse upon repeated tests. That's a bad thing that could make it difficult to salvage the data off the card after acquiring a better one.

I agree it would be nice if Pi Diagnostics also tested power supply, cooling and over-clock settings among others.

npaisnel
Posts: 230
Joined: Sun Aug 05, 2018 4:23 pm

Re: SD Card - Diagnostics

Fri Jun 18, 2021 3:06 pm

ejolson wrote:
Fri Jun 18, 2021 2:52 pm


I agree it would be nice if Pi Diagnostics also tested power supply, cooling and over-clock settings among others.
I have actually found a thread..here where it states that this is the first in a series to tests in development. that was dated March 2020 though

ejolson
Posts: 7615
Joined: Tue Mar 18, 2014 11:47 am

Re: SD Card - Diagnostics

Fri Jun 18, 2021 3:24 pm

npaisnel wrote:
Fri Jun 18, 2021 3:06 pm
ejolson wrote:
Fri Jun 18, 2021 2:52 pm


I agree it would be nice if Pi Diagnostics also tested power supply, cooling and over-clock settings among others.
I have actually found a thread..here where it states that this is the first in a series to tests in development. that was dated March 2020 though
That makes it sound like the developer quit or got involved in something more urgent. Hopefully things will get back on track and the project finished.

User avatar
bensimmo
Posts: 5370
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: SD Card - Diagnostics

Fri Jun 18, 2021 4:09 pm

ejolson wrote:
Fri Jun 18, 2021 2:52 pm
bensimmo wrote:
Fri Jun 18, 2021 1:44 pm
It only repeats tests if it fails any of the four.
It repeats u til it passes all four or fails three times.
Why does the SD card test repeat on failure rather than success?

My experience is that a substandard or failing SD card quickly gets worse upon repeated tests. That's a bad thing that could make it difficult to salvage the data off the card after acquiring a better one.

I agree it would be nice if Pi Diagnostics also tested power supply, cooling and over-clock settings among others.
You know the answer is because that's what they decided https://github.com/raspberrypi-ui/agnostics
But i have had some border line cards fail on the first or second, usually just in one part of the test, it then passes.
It's not a great test, it tries to replicate A1 card test performance.

It is also a test of the Pi it is in, put the same card in a PiZero/Pi1 and it'll bench slower and may fail. A Pi3 will bench slower than a Pi4 and the clock speed within a Pi range alters it too.
Overclock a Pi and it'll usually bench higher, and that a clock overclock, not a pre Pi4 sdoverclock to 100. That does of course help and brings Pi3 up to near Pi4 level of benchmark.

https://github.com/raspberrypi-ui/agnostics you'll see it still developed, but mainly the UI and translations.
No idea what other diagnostics they have/had planned.
Perhaps Config, EEPROM versions and logs for easy posting.
Quick Checks for undervolts and other parts they can grab.

Who knows.

Return to “Troubleshooting”