Wednesday, August 19, 2009

Reveal You Hard Disk Information from Command line


Want to know the Which Make, serial No, Model is your harddisk no need to open your system there are handy command line tools which can help you retrieve Disk Information


# smartctl -i /dev/sda


smartctl version 5.38 [i386-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen


Home page is http://smartmontools.sourceforge.net/



=== START OF INFORMATION SECTION ===


Model Family: Seagate Barracuda 7200.10 family


Device Model: ST3160215AS


Serial Number: 6RA3TSBV


Firmware Version: 3.AAD


User Capacity: 160,040,803,840 bytes


Device is: In smartctl database [for details use: -P show]


ATA Version is: 7


ATA Standard is: Exact ATA specification draft version not indicated


Local Time is: Wed Aug 19 12:38:14 2009 IST


SMART support is: Available - device has SMART capability.


SMART support is: Enabled



METHOD 2


# ls /dev/disk/by-id


ata-ST3160215AS_6RA3TSBV ata-ST3160215AS_6RA3TSBV-part5 scsi-SATA_ST3160215AS_6RA3TSBV scsi-SATA_ST3160215AS_6RA3TSBV-part5


Where ST3160215AS is Model Number and 6RA3TSBV is the serial No.




# hdparm -i /dev/sda


/dev/sda:


Model=ST3160215AS , FwRev=3.AAD , SerialNo= 6RA3TSBV


Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }


RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4


BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=?16?


CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=312579695


IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}


PIO modes: pio0 pio1 pio2 pio3 pio4


DMA modes: mdma0 mdma1 mdma2


UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6


AdvancedPM=no WriteCache=enabled


Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6,7



Note : HDPARM will give you many details please check the man page for details



There are other tools but to use them you need to install them.


1. hwtools



$ hwinfo --disk
...
Model: "ST3160215AS"
Device: "ST3160215AS"
Revision: "3.AAD"
Serial ID: "6RA3TSBV"

No comments:

Post a Comment