Linux Hdparm Command: Display Hard Disk Model and Serial Number

Posted on : April 24, 2011 , Last Updated on : October 2, 2016 By
| Reply More

Hdparm is abbreviated as hard disk parameter. Hdparm is a command line utility used for setting the parameters of ATA hard disk in Linux operating system and also it is useful to view the current setting that is being used for your drive. A hard disk comes with a set default speed  and to change the drive speed, we can use the hdparm utility. Overall, hdparm is the utility helpful to monitor and set the parameters of your hard disk like setting advanced power management features, normal operations (active/idle) and getting information of disk settings like model number, serial number of hard disk etc.

Example: 1

[root@localhost ~]# hdparm -i /dev/hda

Model=VMware Virtual IDE CDROM Drive, FwRev=00000001, SerialNo=0000000000000000 0001
Config={ SoftSect Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=32kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2
Drive conforms to: ATA/ATAPI-4 T13 1153D revision 17: ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4

Using hdparm –i command, it gives information about hard disk settings like model number, serial number of hard disk etc.

Example: 2

[root@localhost /]# hdparm -Tt /dev/sda

Timing cached reads: 2808 MB in 2.00 seconds = 1403.55 MB/sec
Timing buffered disk reads: 80 MB in 3.04 seconds = 26.35 MB/sec

The above command shows the speed of drive reading from buffer cache.

Below option enables DMA for a hard drive.

[root@localhost ~]#hdparm -d1 /dev/hda

To disable DMA for a hard drive, use the below option.

[root@localhost ~]#hdparm -d0 /dev/hda


Tagged With : ,

Free Linux Ebook to Download

Leave a Reply

All comments are subject to moderation.