To find the SATA link speed of a hard disk on a FreeBSD system, you can use the smartctl
utility, which is part of the smartmontools
package. smartctl
allows you to view various attributes of a hard disk, including its SATA link speed.
To use smartctl
to view the SATA link speed of a hard disk, follow these steps:
smartmontools
package on your FreeBSD system if it is not already installed. You can install it using the pkg
package manager:# pkg install smartmontools
Determine the device name of the hard disk you want to check. You can use the dmesg
command to view the system log and find the device name of the hard disk. Look for a line that says something like "da0 at ahcisata0 bus 0 scbus0 target 0 lun 0" or "ada0 at ahcisata0 bus 0 scbus0 target 0 lun 0", where "da0" or "ada0" is the device name of the hard disk.
Use the smartctl
command to view the SATA link speed of the hard disk. The syntax for this command is:
smartctl -a /dev/device-name
Replace device-name
with the device name of the hard disk you determined in step 2. For example, if the device name of the hard disk is da0
, you would use the following command:
smartctl -a /dev/da0
SATA Version is
field in the output of the smartctl
command. This field will show the SATA version and link speed of the hard disk.Here is an example of the output you might see when running smartctl -a /dev/da0
:
=== START OF INFORMATION SECTION === Model Family: Seagate Barracuda 7200.14 (AF) Device Model: ST4000DM000-1F2168 Serial Number: Z1F0Z0G5 Firmware Version: CC47 User Capacity: 4,000,787,030,016 bytes [4.00 TB] Sector Size: 512 bytes logical/physical Rotation Rate: 7200 rpm Form Factor: 3.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-2 (minor revision not indicated) SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Fri Dec 10 14:38:16 2021 CET SMART support is: Available - device has SMART capability. SMART support is: Enabled
In this example, the SATA link speed of the hard disk is 6.0 Gb/s.
For more information about using smartctl
to view the attributes of a hard disk, you can refer to the smartctl
man page by running man smartctl
on the command line, or consult the smartmontools
documentation online.