Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jul 2008 16:19:47 -0400
From:      Jason Morgan <jwm-freebsd-questions@sentinelchicken.net>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Capturing ATA devices serial numbers
Message-ID:  <20080707201947.GA97973@sentinelchicken.net>
In-Reply-To: <006401c8e06b$369de8a0$3ef8a580@lanl.gov>
References:  <006401c8e06b$369de8a0$3ef8a580@lanl.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2008.07.07 13:54:06, Vaughn Clinton wrote:
> All,  
> 
> I'm looking for a FreeBSD utility that will allow me to query a disk for its
> serial number.  Can you point me to such a tool that'll allow me to do so?

Assuming you mean a hard disk, if you can run smartmontools, this is
from smartctl(8):

       -i, --info
              Prints the device model number, serial number, firmware version,
              and  ATA  Standard  version/revision  information.   Says if the
              device supports SMART, and if so, whether SMART support is  cur-
              rently  enabled  or  disabled.   If  the device supports Logical
              Block Address mode (LBA mode) print current user drive  capacity
              in bytes. (If drive is has a user protected area reserved, or is
              "clipped", this may be smaller than the potential maximum  drive
              capacity.)  Indicates if the drive is in the smartmontools data-
              base (see '-v' options below).  If so, the  drive  model  family
              may also be printed. If '-n' (see below) is specified, the power
              mode of the drive is printed.

Full man page is here:
http://smartmontools.sourceforge.net/man/smartctl.8.html

Port is here:
/usr/ports/sysutils/smartmontools

HTH,
~Jason Morgan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080707201947.GA97973>