LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-26-2015, 03:52 PM   #1
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,959

Rep: Reputation: 271Reputation: 271Reputation: 271
Is there a program to measure the speed of a hard drive?


I'm pretty sure my hard drive has slowed down recently. Is there a program to measure this?

I appreciate that I should have gotten the program when I got the computer in the first place so I can compare.
 
Old 06-26-2015, 04:24 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
While it is not a "speed test" program, if you are running Slackware (and most other distros) you will have smartctl installed or easily available which should be able to give you overall information about the health of your hard drive.

If slow speed results from drive r/w errors, as is almost always the case, that will show up in the self tests.

See man smartctl, as always.

It is also possible that your drive or some partition on the drive is nearly full which can also slow things.

Last edited by astrogeek; 06-26-2015 at 04:26 PM. Reason: typos, additional thoughts
 
1 members found this post helpful.
Old 06-28-2015, 02:50 PM   #3
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,959

Original Poster
Rep: Reputation: 271Reputation: 271Reputation: 271
Hmmm... I ran
Quote:
smartctl -t offline /dev/sda
. smartctl told me
Quote:
Sending command: "Execute SMART off-line routine immediately in off-line mode".
Drive command "Execute SMART off-line routine immediately in off-line mode" successful.
Testing has begun.
Please wait 6780 seconds for test to complete.
Test will complete after Sat Jun 27 23:49:58 2014
I went to bed. The next day
Quote:
smartctl -l selftest /dev/sda'
returned
Quote:
No self-tests have been logged
There was no report displayed. The disk is 58% full. I also noticed no new process was spawned by running smartctl -t offline.
 
Old 06-28-2015, 02:55 PM   #4
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Code:
# hdparm -Tt /dev/sdX
Or you could use `dd`
https://wiki.archlinux.org/index.php...rking#Using_dd
 
2 members found this post helpful.
Old 06-28-2015, 04:32 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by RandomTroll View Post
Hmmm... I ran . smartctl told me
I went to bed. The next day returned There was no report displayed. The disk is 58 full. I also noticed no new process was spawned by running smartctl -t offline.
From the project website:

Quote:
Offline Test

Despite its name offline is a short foreground test of less than 2 minutes that all devices should support. The default self test makes no entry into the self test log. Most devices perform a default self test when they are being powered up.
And the smartctl man page for -t options:

Code:
  offline - [ATA] runs SMART Immediate Offline Test. This immediately starts  the  test  described
  above. This  command can be given during normal system operation. The effects of this test are
  visible only in that it updates the SMART Attribute values, and if errors  are  found  they  will
  appear in the SMART error log, visible with the -l error option.
So there is no visible report for an offline test. You might try the short or long options instead as they are logged and a little more clear.

I too, find the smartctl options and useage a little obscure at times.

Run the long selftest tonight when you go to bed and check the results in the morning.

Last edited by astrogeek; 06-28-2015 at 04:34 PM.
 
1 members found this post helpful.
Old 06-29-2015, 04:50 AM   #6
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Quote:
Originally Posted by RandomTroll View Post
Hmmm... I ran . smartctl told me
Quote:
Sending command: "Execute SMART off-line routine immediately in off-line mode".
Drive command "Execute SMART off-line routine immediately in off-line mode" successful.
Testing has begun.
Please wait 6780 seconds for test to complete.
Test will complete after Sat Jun 27 23:49:58 2014
Something odd there?
 
Old 06-29-2015, 12:17 PM   #7
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,959

Original Poster
Rep: Reputation: 271Reputation: 271Reputation: 271
smartctl tests find no errors. This leaves me back at my original question: is there a speed test?
 
Old 06-29-2015, 02:06 PM   #8
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Ahem:
Quote:
Originally Posted by Head_on_a_Stick View Post
Code:
# hdparm -Tt /dev/sdX
Or you could use `dd`
https://wiki.archlinux.org/index.php...rking#Using_dd
 
Old 06-30-2015, 01:04 AM   #9
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Use 'hdparm -t /dev/sdx' to get raw transfer speed. The '-T' switch causes buffered (Linux Kernel Bufferring) read/write test which is not real raw device transfer speed.

And as previous post said 'dd' can be used too.

Code:
For read
dd if=/dev/sdx of=/dev/null bs=1M count=300

For write be careful!!! the device may be overwritten, so use a blank drive.
dd if=/dev/zero of=/dev/sdx bs=1M count=300
After 'dd' runs and stops it would show transfer statistics.
 
Old 07-03-2015, 12:26 PM   #10
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,959

Original Poster
Rep: Reputation: 271Reputation: 271Reputation: 271
Thanks for the hdparm tip; I added running it and logging the output to rc.local; I'll build a record. It's short so can't test much of the disk, but smartctl's extensive search for errors turned nothing up. I have a program 'memtest' that boots into a RAM test. I'd like something like that for disk testing.
test jbmail
MyCompass depression therapy
Beating the Blues
American version of Beating the Blues
add lock; add pedals ; delete rim & hub?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
measure USB drive speed SaintDanBert Linux - Hardware 3 05-31-2011 09:39 AM
Speed up hard drive? usaf_sp Linux - Hardware 21 11-06-2005 03:01 AM
Hard drive access speed andy753421 Linux - Hardware 3 04-13-2005 09:54 PM
Speed up my hard drive during boot up XPediTioN Slackware 4 08-12-2004 01:07 AM
Hard Drive Speed problems XPediTioN Slackware 6 07-15-2004 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration