uniquely identifying a machine...

Arne Koewing ark at gmx.net
Mon Mar 10 14:10:37 EST 2003


Hard disks have an serial number...  You can get the hard disk serial
number, if it is an ATA disk, with a HDIO_GET_IDENTITY ioctl.
(hdparm does this)


you should also be able to find the serial in /proc/ide/hda/identify 
(hdparm -i /dev/hda) should report the same.
(its is the serial as read at boot time)

(hdparm -I /dev/hd?) gets the serial again (from the disk)
there were some reports that -i and -I return different results with 
certain disks or kernel versions...

/proc/ide/hda/identify and hdparm -i /dev/hda  should always report
the same id.

i don't know it SCSI disks have an serial...

Arne




More information about the Python-list mailing list