Possum
Posts: 37
Joined: Thu Mar 22, 2012 2:32 pm
Contact: Website

Can I run agnostics from the Terminal

Wed Jun 17, 2020 3:27 am

Hi

Can I run agnostics from the Terminal to do a SD Card Speed Test. If I can where can I find any data on how to do this..?

Thank You..

klricks
Posts: 7279
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Can I run agnostics from the Terminal

Wed Jun 17, 2020 4:20 am

Possum wrote:
Wed Jun 17, 2020 3:27 am
Hi

Can I run agnostics from the Terminal to do a SD Card Speed Test. If I can where can I find any data on how to do this..?

Thank You..
Not sure what data you are looking for?
To run from terminal open lxterminal and enter:

Code: Select all

agnostics
Note that agnostics is a GUI program which requires Desktop.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

User avatar
CaptainMidnight
Posts: 143
Joined: Sun Nov 03, 2019 4:32 pm
Location: UK

Re: Can I run agnostics from the Terminal

Wed Jun 17, 2020 6:03 am

Possum wrote:
Wed Jun 17, 2020 3:27 am
Hi

Can I run agnostics from the Terminal to do a SD Card Speed Test. If I can where can I find any data on how to do this..?

Thank You..

Do you mean do this .......

Code: Select all

pi@phoenix-pi-x64:~ $ sh /usr/share/agnostics/sdtest.sh
Run 1
prepare-file;0;0;327680;640
seq-write;0;0;330989;646
rand-4k-write;0;0;87732;21933
rand-4k-read;62894;15723;0;0
Sequential write speed 330989 KB/sec (target 10000) - PASS
Random write speed 21933 IOPS (target 500) - PASS
Random read speed 15723 IOPS (target 1500) - PASS
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

wildestpixel
Posts: 65
Joined: Sun May 26, 2019 7:45 pm
Contact: Website

Re: Can I run agnostics from the Terminal

Wed Jun 17, 2020 6:19 am

CaptainMidnight wrote:
Wed Jun 17, 2020 6:03 am
Possum wrote:
Wed Jun 17, 2020 3:27 am
Hi

Can I run agnostics from the Terminal to do a SD Card Speed Test. If I can where can I find any data on how to do this..?

Thank You..

Do you mean do this .......

Code: Select all

pi@phoenix-pi-x64:~ $ sh /usr/share/agnostics/sdtest.sh
Run 1
prepare-file;0;0;327680;640
seq-write;0;0;330989;646
rand-4k-write;0;0;87732;21933
rand-4k-read;62894;15723;0;0
Sequential write speed 330989 KB/sec (target 10000) - PASS
Random write speed 21933 IOPS (target 500) - PASS
Random read speed 15723 IOPS (target 1500) - PASS
This is the helpful answer - thanks
much solution-ness - https://www.wildestpixel.co.uk

Possum
Posts: 37
Joined: Thu Mar 22, 2012 2:32 pm
Contact: Website

Re: Can I run agnostics from the Terminal

Wed Jun 17, 2020 9:51 pm

sh /usr/share/agnostics/sdtest.sh

Thx.. That exactly what I needed..

Cheers

Possum
Posts: 37
Joined: Thu Mar 22, 2012 2:32 pm
Contact: Website

Re: Can I run agnostics from the Terminal

Thu Jun 18, 2020 5:28 pm

Going by this I must have very poor MicroSDs. That would be true or is there something I need to know.

Code: Select all

pi@raspberrypi:~ $ sh /usr/share/agnostics/sdtest.sh
Run 1
prepare-file;0;0;9293;18
seq-write;0;0;10146;19
rand-4k-write;0;0;929;232
rand-4k-read;3731;932;0;0
Sequential write speed 10146 KB/sec (target 10000) - PASS
Random write speed 232 IOPS (target 500) - FAIL
Random read speed 932 IOPS (target 1500) - FAIL
Last edited by Possum on Thu Jun 18, 2020 9:06 pm, edited 1 time in total.

User avatar
CaptainMidnight
Posts: 143
Joined: Sun Nov 03, 2019 4:32 pm
Location: UK

Re: Can I run agnostics from the Terminal

Thu Jun 18, 2020 5:41 pm

IF you have a desktop gui, you could also use the benchmark feature in gnome-disk-utility.

I say 'IF' as your request was asking '.... from the Terminal' ;)

Edit: it'll also allow you to access any S.M.A.R.T data available from the drive.
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

pfletch101
Posts: 630
Joined: Sat Feb 24, 2018 4:09 am
Location: Buffalo, NY, USA

Re: Can I run agnostics from the Terminal

Thu Jun 18, 2020 11:12 pm

Possum wrote:
Thu Jun 18, 2020 5:28 pm
Going by this I must have very poor MicroSDs. That would be true or is there something I need to know.

Code: Select all

pi@raspberrypi:~ $ sh /usr/share/agnostics/sdtest.sh
Run 1
prepare-file;0;0;9293;18
seq-write;0;0;10146;19
rand-4k-write;0;0;929;232
rand-4k-read;3731;932;0;0
Sequential write speed 10146 KB/sec (target 10000) - PASS
Random write speed 232 IOPS (target 500) - FAIL
Random read speed 932 IOPS (target 1500) - FAIL
The software Doc warns that it needs to be run on a 'virgin' SD. If a SD has been in a live system for any length of time, and has had stuff written on and deleted from it, you are likely to get artificially low numbers, even on a good SD. I am not sure how one might go about returning a used SD to a 'virgin' state for testing.

HvdW
Posts: 163
Joined: Tue Jun 17, 2014 12:41 pm

Re: Can I run agnostics from the Terminal

Sun Sep 27, 2020 10:49 pm

Code: Select all

prepare-file;0;0;11330;22
seq-write;0;0;12661;24
rand-4k-write;0;0;1090;272
rand-4k-read;5928;1482;0;0
Sequential write speed 12661 KB/sec (target 10000) - PASS
Random write speed 272 IOPS (target 500) - FAIL
Random read speed 1482 IOPS (target 1500) - FAIL
On a 2014 model B, 8G Sandisk Ultra
The fact that it's able running Buster is more important than speed.
Who knows knows
Who doesn't doesn't

cleverca22
Posts: 1831
Joined: Sat Aug 18, 2012 2:33 pm

Re: Can I run agnostics from the Terminal

Sun Sep 27, 2020 11:20 pm

Code: Select all

root@raspberrypi:~# /usr/share/agnostics/sdtest.sh
Run 1
prepare-file;0;0;4403;8
seq-write;0;0;4357;8
rand-4k-write;0;0;2038;509
rand-4k-read;9210;2302;0;0
Sequential write speed 4357 KB/sec (target 10000) - FAIL
Note that sequential write speed declines over time as a card is used - your card may require reformatting
Random write speed 509 IOPS (target 500) - PASS
Random read speed 2302 IOPS (target 1500) - PASS
Run 2
prepare-file;0;0;5529;10
seq-write;0;0;3723;7
rand-4k-write;0;0;460;115
rand-4k-read;9083;2270;0;0
Sequential write speed 3723 KB/sec (target 10000) - FAIL
Note that sequential write speed declines over time as a card is used - your card may require reformatting
Random write speed 115 IOPS (target 500) - FAIL
Random read speed 2270 IOPS (target 1500) - PASS
root@raspberrypi:~# df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G   12G  2.5G  83% /
just to see how my pi was performing, i gave it a spin, and the numbers seemed pretty bad
but then i deleted ~6gig worth of unused files, ran a trim, and gave it another spin

Code: Select all

root@raspberrypi:~# fstrim -v /
/: 6.2 GiB (6612336640 bytes) trimmed
root@raspberrypi:~# /usr/share/agnostics/sdtest.sh
Run 1
prepare-file;0;0;16491;32
seq-write;0;0;14854;29
rand-4k-write;0;0;2719;679
rand-4k-read;9291;2322;0;0
Sequential write speed 14854 KB/sec (target 10000) - PASS
Random write speed 679 IOPS (target 500) - PASS
Random read speed 2322 IOPS (target 1500) - PASS
/usr/share/agnostics/sdtest.sh: line 34: return: can only `return' from a function or sourced script
Run 2
prepare-file;0;0;8562;16
seq-write;0;0;16765;32
rand-4k-write;0;0;2805;701
rand-4k-read;9243;2310;0;0
Sequential write speed 16765 KB/sec (target 10000) - PASS
Random write speed 701 IOPS (target 500) - PASS
Random read speed 2310 IOPS (target 1500) - PASS
/usr/share/agnostics/sdtest.sh: line 34: return: can only `return' from a function or sourced script
root@raspberrypi:~# df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  5.8G  8.0G  43% /
and now sequential writes are ~5x faster, and random writes dont horribly tank when it runs a second pass

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

Re: Can I run agnostics from the Terminal

Mon Sep 28, 2020 7:49 am

Possum wrote:
Thu Jun 18, 2020 5:28 pm
Going by this I must have very poor MicroSDs. That would be true or is there something I need to know.

Code: Select all

pi@raspberrypi:~ $ sh /usr/share/agnostics/sdtest.sh
Run 1
prepare-file;0;0;9293;18
seq-write;0;0;10146;19
rand-4k-write;0;0;929;232
rand-4k-read;3731;932;0;0
Sequential write speed 10146 KB/sec (target 10000) - PASS
Random write speed 232 IOPS (target 500) - FAIL
Random read speed 932 IOPS (target 1500) - FAIL
not necessarily, the benchmark pass is quite high, it's based around modern A1 card speeds on modern Pi3 onwards (or similar cards that can do the same).
It's the random that would generally fail.

Older Pi also get much lower benchmarks than faster more modern Pi.

What are you running it on and what Pi is it?

Return to “General discussion”