How to check hard disk information and hdd read right speed in linux | linuxtopic

Linuxtopic
1
hdparm is a command line utility for checking hard disk drive information, hardware parameters, disk read write speed and more. It can set parameters such as drive caches, sleep mode, power management, acoustic management, and DMA settings.

This post tell yo that how to get harddisk / hdd information, get hdd serial number, get hard disk model number, hard disk capacity or size , check hdd read write speed, sleep mode, power management, and more. hdparm command, hdparm, to check disk read write speed



Hard Disk Information :

A : Install hdparm in CentOS / RHEL 7
yum install hdparm

B : Install hdparm in Ubuntu 14 /16/ 17
apt-get update

apt-get install hdparm

Get hdparm help, just type
hdparm
hdparm - get/set hard disk parameters - version v9.48, by Mark Lord.

Usage:  hdparm  [options] [device ...]

Options:
-a   Get/set fs readahead
-A   Get/set the drive look-ahead flag (0/1)
-b   Get/set bus state (0 == off, 1 == on, 2 == tristate)
-B   Set Advanced Power Management setting (1-255)
-c   Get/set IDE 32-bit IO setting
-C   Check drive power mode status
-d   Get/set using_dma flag
-D   Enable/disable drive defect management
-E   Set cd/dvd drive speed
-f   Flush buffer cache for device on exit
-F   Flush drive write cache
-g   Display drive geometry
-h   Display terse usage information
-H   Read temperature from drive (Hitachi only)
-i   Display drive identification
-I   Detailed/current information directly from drive
-J   Get/set Western DIgital "Idle3" timeout for a WDC "Green" drive (DANGEROUS)
-k   Get/set keep_settings_over_reset flag (0/1)
-K   Set drive keep_features_over_reset flag (0/1)
-L   Set drive doorlock (0/1) (removable harddisks only)
-m   Get/set multiple sector count
-M   Get/set acoustic management (0-254, 128: quiet, 254: fast)
-n   Get/set ignore-write-errors flag (0/1)
-N   Get/set max visible number of sectors (HPA) (VERY DANGEROUS)
-p   Set PIO mode on IDE interface chipset (0,1,2,3,4,...)
-P   Set drive prefetch count
-q   Change next setting quietly
-Q   Get/set DMA queue_depth (if supported)
-r   Get/set device readonly flag (DANGEROUS to set)
-R   Get/set device write-read-verify flag
-s   Set power-up in standby flag (0/1) (DANGEROUS)
-S   Set standby (spindown) timeout
-t   Perform device read timings
-T   Perform cache read timings
-u   Get/set unmaskirq flag (0/1)
-U   Obsolete
-v   Use defaults; same as -acdgkmur for IDE drives
-V   Display program version and exit immediately
-w   Perform device reset (DANGEROUS)
-W   Get/set drive write-caching flag (0/1)
-x   Obsolete
-X   Set IDE xfer mode (DANGEROUS)
-y   Put drive in standby mode
-Y   Put drive to sleep
-z   Re-read partition table
-Z   Disable Seagate auto-powersaving mode
…………….
...................
...................

Get Hard Disk Serial Number, HDD Model Number, etc
hdparm -I /dev/sda
/dev/sda:

ATA device, with non-removable media
   Model Number:       InnoDisk Corp. - mSATA 3ME3           
   Serial Number:      B2A11612050150138
   Firmware Revision:  S16425  
   Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
   Supported: 8 7 6 5
   Likely used: 8
Configuration:
   Logical       max    current
   cylinders    16383    16383
   heads       16    16
   sectors/track    63    63
   --
   CHS current addressable sectors:   16514064
   LBA    user addressable sectors:   31277232
   LBA48  user addressable sectors:   31277232
   Logical  Sector size:                   512 bytes
   Physical Sector size:                   512 bytes
   Logical Sector-0 offset:                  0 bytes
   device size with M = 1024*1024:       15272 MBytes
   device size with M = 1000*1000:       16013 MBytes (16 GB)
   cache/buffer size  = unknown
   Form Factor: 2.5 inch
   Nominal Media Rotation Rate: Solid State Device
Capabilities:
…………….
...................
...................

Check Hard Disk Read Write

To Check Disk R/W ( Read Write ) speed using hdparm
hdparm -Tt /dev/sda

To Check Disk R/W ( Read Right ) speed using dd command

dd if=/dev/zero of=/tmp/dummyfile conv=fdatasync bs=512k count=1k ; rm -rf /tmp/dummyfile

To know more about dd click here..

Post a Comment

1Comments

Post a Comment

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!