Getting Mellanox card serial number

When you have a Mellanox (Nvidia) NIC, you often need to find the serial number of it, so you can tie a license to it (Rivermax etc)

To find the serial number, first list all Mellanox cards in the system:

# lspci | grep Mellanox
27:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]

Then, for each card in the system (you might have more than one), run the following (replacing the PCIe address as apropriate):

# lspci -vv -s 0a:00.0 | grep "Serial number" -A 3