Testing the speed of USB flash drives
Moderator: Forum moderators
- smokey01
- Posts: 194
- Joined: Sun Jul 12, 2020 10:46 am
- Location: Australia
- Has thanked: 25 times
- Been thanked: 28 times
- Contact:
Testing the speed of USB flash drives
- Attachments
-
- ds.tar
- Click to extract.
- (10 KiB) Downloaded 199 times
-
- Screeny
- ds.png (37.92 KiB) Viewed 4057 times
Re: Drive Speed
On my Slacko 64:
Code: Select all
# bash --version
GNU bash, versión 4.2.53(2)-release (x86_64-slackware-linux-gnu)
# uname --all
Linux puppypc5895 4.1.11 #1 SMP Mon Oct 26 11:19:32 EST 2015 x86_64 Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz GenuineIntel GNU/Linux
-----
sh: line 3: numfmt: can't find the command
ERROR
hdparm: invalid option -- '-'
hdparm: invalid number 'irect'
awk: cmd. line:1: (FILENAME=- FNR=1) fatal: attempt to access field -1
COMBOBOX="sda"
INPUT="ATA TOSHIBA MK3261GS MB/sec
"
EXIT=" Quit "
------
Dunno how to install numfmt, however I've fixed with the simple hdparm (no --direct option) command and format the number in MB, so my hdparm output is in KB:
Code: Select all
speed1="$(hdparm -t /dev/$COMBOBOX)"
speed2=`echo "${speed2:0:(${#speed2}-3)},${speed2:(-3)}"`
Cheers!
- smokey01
- Posts: 194
- Joined: Sun Jul 12, 2020 10:46 am
- Location: Australia
- Has thanked: 25 times
- Been thanked: 28 times
- Contact:
Re: Drive Speed
I just tried Drive Speed in slacko64-6.9.9.9-uefi-k4.9-FF-LO.iso. I noticed it is using hdparm which is included in busybox. Quite often the apps in busybox don't have full functionality. If you install hdparm from the package manager it should work. It did here.
Enjoy.
Re: Drive Speed
Distro: LxPupSc64 19.09
Desktop Panel: lxpanel 0.10.0
Window Manager: Openbox 3.6.1
Desktop Start: xwin startlxde
hdparm caused the same error as previously mentioned. Yet it seemed to be installed....
Then I reinstalled it from the package manager. I did not remove any previous installation of hdparm.
Works great now !
Thanks Smokey01, for a very easy to use script.
- smokey01
- Posts: 194
- Joined: Sun Jul 12, 2020 10:46 am
- Location: Australia
- Has thanked: 25 times
- Been thanked: 28 times
- Contact:
Re: Drive Speed
Thanks for letting me know, enjoy.
- smokey01
- Posts: 194
- Joined: Sun Jul 12, 2020 10:46 am
- Location: Australia
- Has thanked: 25 times
- Been thanked: 28 times
- Contact:
Re: Drive Speed
After doing a lot of detective work it appears you are running Linux puppy-slacko64-6.3.0 4.1.11 #1 SMP x86_64 Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz GNU/Linux. If this is the case numfmt was not included.
If you copy the attached file into /usr/local/bin and extract it by clicking it, it should show you the size.
seneka77 wrote: Wed Jul 15, 2020 6:34 pm Thanks for sharing, nice app, great shell script sample with GUI.
On my Slacko 64:I've got the following error in the term when do the check over my hard-disk:Code: Select all
# bash --version GNU bash, versión 4.2.53(2)-release (x86_64-slackware-linux-gnu) # uname --all Linux puppypc5895 4.1.11 #1 SMP Mon Oct 26 11:19:32 EST 2015 x86_64 Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz GenuineIntel GNU/Linux
-----
sh: line 3: numfmt: can't find the command
ERROR
hdparm: invalid option -- '-'
hdparm: invalid number 'irect'
awk: cmd. line:1: (FILENAME=- FNR=1) fatal: attempt to access field -1
COMBOBOX="sda"
INPUT="ATA TOSHIBA MK3261GS MB/sec
"
EXIT=" Quit "
------
Dunno how to install numfmt, however I've fixed with the simple hdparm (no --direct option) command and format the number in MB, so my hdparm output is in KB:Now just need to fix the size part.Code: Select all
speed1="$(hdparm -t /dev/$COMBOBOX)" speed2=`echo "${speed2:0:(${#speed2}-3)},${speed2:(-3)}"`
Cheers!
- Attachments
-
- numfmt.tar
- numfmt binary
- (70 KiB) Downloaded 100 times
Re: Testing the speed of USB flash drives
I've also checked the program in my old Puppy tahr64 6.0.5 distro
Code: Select all
# ds
/mnt/sda9/script/ds: line 7: lsblk: command not found
COMBOBOX=""
INPUT="Select a drive then press the Test Button.
"
EXIT=" Quit "
root# uname --all
Linux puppypc14017 3.14.54 #1 SMP PREEMPT Tue Dec 1 17:54:26 GMT 2015 x86_64 x86_64 x86_64 GNU/Linux
Code: Select all
ls /dev/sd? | grep sd. -o > /tmp/thelist
Cheers!
- puddlemoon
- Posts: 188
- Joined: Sun Sep 06, 2020 9:26 pm
- Location: In between
- Has thanked: 89 times
- Been thanked: 63 times
Re: Testing the speed of USB flash drives
Thanks for this! super handy to pick which usb, from my pile of rejects, is the best choice to make an install on!!
So I have been looking for a script to use as a base for a similar(ish) set of commands. I'm a real novice so I need a starting point.
I'd be so grateful if you'd coach me on that..??
I'd like to display list of sound cards from /proc/asound/cards and have an input box to insert the selection and nickname into to next command. any advice on how to modify it would be great. If you don't mind me doing so of course...
- smokey01
- Posts: 194
- Joined: Sun Jul 12, 2020 10:46 am
- Location: Australia
- Has thanked: 25 times
- Been thanked: 28 times
- Contact:
Re: Testing the speed of USB flash drives
How would you like to display the cards? In a terminal, GUI like gtkdialog or yad etc.puddlemoon wrote: Thu Oct 15, 2020 10:58 pm Hi there,
I'd like to display list of sound cards from /proc/asound/cards and have an input box to insert the selection and nickname into to next command. any advice on how to modify it would be great. If you don't mind me doing so of course...
typing "cat /proc/asound/cards" in a terminal will list your cards.
Do you want to list the sound cards in a combobox?
For anyone to help, you need to be very specific.
If you have the devx loaded there are many example of gtkdialog that will help at:
/usr/share/doc/gtkdialog-514
Cheers
- puddlemoon
- Posts: 188
- Joined: Sun Sep 06, 2020 9:26 pm
- Location: In between
- Has thanked: 89 times
- Been thanked: 63 times
Re: Testing the speed of USB flash drives
yep, I'm hoping to use gtkdialog or yad to display "cat /proc/asound/cards" ideally in a combobox to pass to the selection to the next command. and an input box for the second part.
but the second command needs only part of the output for the given card.
so from..
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf0600000 irq 32
I just need "PCH" the first "short name"
The next command is to connect the selected card to jack with name provided in input box
' zita-a2j -dhw:card -jnickname '
But ya know, this is really way simple by comparison and also totally off topic so I apologize for piping in here...
I will do some more homework
Re: Testing the speed of USB flash drives
Thanks smokey01 for this application
As in an earlier message, I too have some ancient USB flash drives lying around and now I can see if there still usable.
**EDIT
Also used it to check out the speed of external USB HDD drives. Worked in exactly the same way
- gychang
- Posts: 629
- Joined: Fri Aug 28, 2020 4:51 pm
- Location: San Diego, CA
- Has thanked: 220 times
- Been thanked: 70 times
Re: Testing the speed of USB flash drives
smokey01 wrote: Mon Jul 13, 2020 10:26 amRecently I wanted to test a few USB Flash drives but I had forgotten the command. A quick look at the murga forums reminded me of the thread I had started there. I have now expanded the simple hdparm command into a simple gtkdialog script.
This is very well done, simple and quick and intuitive,
- mikewalsh
- Moderator
- Posts: 6344
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 871 times
- Been thanked: 2072 times
Re: Testing the speed of USB flash drives
gychang wrote: Sun Oct 30, 2022 8:18 pmsmokey01 wrote: Mon Jul 13, 2020 10:26 amRecently I wanted to test a few USB Flash drives but I had forgotten the command. A quick look at the murga forums reminded me of the thread I had started there. I have now expanded the simple hdparm command into a simple gtkdialog script.
This is very well done, simple and quick and intuitive,
@gychang :-
There's also the DriveSpeed! portable package I put together a while back, after getting inspiration from Barry's EasyDD.....which features an on-going readout of real-time speeds as it tests a drive.
https://forum.puppylinux.com/viewtopic.php?t=2836
For straight-forward testing, I recommend the v2.2-portable, attached to the first post. Fred and stemsee took the concept & "ran with it", developing v3 and v4, but much of this was them playing around with YAD GUIs, and seeing just how many 'extras' they could cram in. It became a little bit "OTT" for my liking!
IMHO, v2.2 does all you want - the GUI even has the functions numbered in the order you need to run them, for maximum ease-of-use. To use it, keep a main copy of it somewhere safe; for testing drives, just copy the whole thing to the root of that drive; it's pretty small, and is designed to work "in-situ". It's a ROX-app, so just click on it to run it. When you're done, simply delete the whole thing again.
The 'Help' file explains what to do with it, and how to get the best out of it, depending on age & capabilities of your hardware, and the type of drive you're testing (it'll work with ANY kind of storage drive).
Just another alternative, FWIW.
Mike.
-
- Posts: 4055
- Joined: Fri Jul 24, 2020 10:59 pm
- Has thanked: 1702 times
- Been thanked: 551 times
Re: Testing the speed of USB flash drives
Hi @mikewalsh
DriveSpeed is very nice.
Idea for your consideration
Have you thought to add the 'latest' desktop picture of the latest DriveSpeed version to your opening post, here?
If you feel it worthy.
- smokey01
- Posts: 194
- Joined: Sun Jul 12, 2020 10:46 am
- Location: Australia
- Has thanked: 25 times
- Been thanked: 28 times
- Contact:
Re: Testing the speed of USB flash drives
I bought a new laptop recently and it had a nvme drive. The problem was drivespeed couldn't see it so I added this functionality. Drivespeed should be able to test all types of drives now like: usb, hdd, ssd, mmc, nvme etc.
- Attachments
-
- drivespeed.tar.gz
- (1.57 KiB) Downloaded 72 times