Page 1 of 1

Testing the speed of USB flash drives

Posted: Mon Jul 13, 2020 10:26 am
by smokey01
Recently 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.

Re: Drive Speed

Posted: Wed Jul 15, 2020 6:34 pm
by seneka77
Thanks for sharing, nice app, great shell script sample with GUI.
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
I've got the following error in the term when do the check over my hard-disk:
-----
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)}"`
Now just need to fix the size part.
Cheers!

Re: Drive Speed

Posted: Wed Jul 15, 2020 10:32 pm
by smokey01
Maybe updating hdparm might fix the problem. I will have a look when I get some time, hopefully later today.

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

Posted: Sun Jul 19, 2020 10:18 am
by Geek3579
Ive just tried to run Drive Speed in the following:

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.

Re: Drive Speed

Posted: Sun Jul 19, 2020 10:36 pm
by smokey01
That's because your computer is now using the full version of hdparm instead of the one in busybox.

Thanks for letting me know, enjoy.

Re: Drive Speed

Posted: Mon Jul 20, 2020 12:57 pm
by smokey01
@seneka77,
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:

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
I've got the following error in the term when do the check over my hard-disk:
-----
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)}"`
Now just need to fix the size part.
Cheers!

Re: Testing the speed of USB flash drives

Posted: Sun Aug 02, 2020 4:17 pm
by seneka77
Thanks a lot, so now works great in my Puppy slacko @smokey01 , @Geek3579

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
So now the problem is with lsblk command, but anyway I'vef fixed soon , just replace it with the line:

Code: Select all

ls /dev/sd? | grep sd. -o > /tmp/thelist
instead the 'lsblk' one, and it works.
Cheers!

Re: Testing the speed of USB flash drives

Posted: Thu Oct 15, 2020 10:58 pm
by puddlemoon
Hi there,

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...

Re: Testing the speed of USB flash drives

Posted: Fri Oct 16, 2020 8:10 am
by smokey01
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...
How would you like to display the cards? In a terminal, GUI like gtkdialog or yad etc.

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

Re: Testing the speed of USB flash drives

Posted: Fri Oct 16, 2020 8:53 am
by puddlemoon
hi @smokey01 yes, i realized i kinda just blurted it out there... thanks for the response.

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

Posted: Sun Oct 30, 2022 5:43 pm
by Jasper

Thanks smokey01 for this application :thumbup2:

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 :thumbup:


Re: Testing the speed of USB flash drives

Posted: Sun Oct 30, 2022 8:18 pm
by gychang
smokey01 wrote: Mon Jul 13, 2020 10:26 am

Recently 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, :thumbup:


Re: Testing the speed of USB flash drives

Posted: Tue Nov 01, 2022 1:00 pm
by mikewalsh
gychang wrote: Sun Oct 30, 2022 8:18 pm
smokey01 wrote: Mon Jul 13, 2020 10:26 am

Recently 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, :thumbup:

@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! :D

Image

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. ;)


Re: Testing the speed of USB flash drives

Posted: Tue Nov 01, 2022 9:57 pm
by Clarity

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.


Re: Testing the speed of USB flash drives

Posted: Tue Nov 14, 2023 10:09 pm
by smokey01

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.