Linux Command To Find SATA Link Speed Such as 1.5 / 3.0 / 6.0 Gbps [ Hard Disk ]

Originally published at:

How do I find out my SATA link speed? How do I make sure my sata hard disk is working at 6Gbps speed and how do I verify this on a Linux server running on HP or IBM amd64 hardware?

dmesg | grep “SATA link up”
dmesg | grep “ata2” … for example

its all in dmesg