Linux Hdparm Command : Display Hard Disk Model and Serial Number
Hdparm is abrievated as hard disk parameter, hdparm is a command line utility used for setting the paramteres 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 , to change the drive speed we can use the hdparm utility. Overall hdparm is the utility helpful to moniter and setting the parameters of your hard disk like setting advanced power management features, normal operations (active / idle), getting information of disk settings like model number and serial number of hard disk etc.
Example: 1
[root@localhost ~]# hdparm -i /dev/hda
/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
AdvancedPM=no
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 gives information about hard disk settings like model number, serial number of hard disk etc..
Example: 2
[root@localhost /]# hdparm -Tt /dev/sda
/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
Category: Linux Administration
