Linux command driver version

HowTo Check HBA Firmware & Driver Version Info Linux

FC HBA – Fiber Channel Host Bus Adapter which is used to connect SAN devices to servers. To allocate LUN(s)/storage space to server. In this article i am going to show you Howto check HBA firmware & Driver Version Info Linux. Which are the details required to cross verify compatibility with SAN switch connectivity.

Check HBA Firmware & Driver Version Info Linux

The very first command is to verify whether we have HBA cards installed in your machine.

# lspci -nn | grep -i hba 04:00.0 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02) 04:00.1 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02)

Note: Highlighted in orange color or PCI slot numbers, remember we use them in this article

# ls -l /sys/class/fc_host total 0 drwxr-xr-x 3 root root 0 Feb 19 23:44 host11 drwxr-xr-x 3 root root 0 Feb 19 23:44 host12

Check current used host number details using above command and note it down.

Now check it up Kernel driver name as shown below

# lspci -vvv -s 04:00.1 |grep -i "Kernel Driver" Kernel driver in use: qla2xxx

Get HBA Driver Info

Vendor details HowTo Check HBA Firmware & Driver Info in Linux

# lspci -k -s 04:00.0 04:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02) Subsystem: QLogic Corp. Device 015d Kernel driver in use: qla2xxx Kernel modules: qla2xxx

Use modinfo command to get the version details

# modinfo qla2xxx | grep version version: 8.03.07.15.05.09-k srcversion: A40E0347B413757ECA197E44
# systool -c scsi_host -v -d host11 | grep driver_version driver_version = "8.03.07.15.05.09-k"

Firmware Version Details

Host Bus Adapter firmware details can be achieved using below command

# systool -c scsi_host -v -d host11 | grep fw_version 84xx_fw_version = "" fw_version = "5.06.03 (90d5)" optrom_fw_version = "8.01.02 32896"

You can also use scli command to get HBA firmware details

# scli -i | grep "Driver Firmware Version" Driver Firmware Version : 5.06.03 (90d5) Driver Firmware Version : 5.06.03 (90d5)

Single command get all Firmware, Driver and HBA Model details. HowTo Check HBA Firmware & Driver Info in Linux

# systool -a -v -c scsi_host host11 | egrep "Class Device|model|version|proc_name" Class Device = "host11" Class Device path = "/sys/class/scsi_host/host11" 84xx_fw_version = "" driver_version color: #ff6600;">8.03.07.15.05.09-k" fw_version color: #ff6600;">5.06.03 (90d5)" model_desc = "PCI-Express Dual Channel 8Gb Fibre Channel HBA" model_name color: #ff6600;">QLE2562" mpi_version = "" optrom_bios_version = "3.31" optrom_efi_version = "6.10" optrom_fcode_version= "0.00" optrom_fw_version = "8.01.02 32896" phy_version = "" proc_name = ""

Conclusion

HowTo Check HBA Firmware & Driver Info in Linux is very simple using above commands. First identify which card details you would like to find they note there slot number details and hostN.

Читайте также:  Права доступа linux 755

Thanks for your wonderful Support and Encouragement

More than 40000 Techies in our community do you want part of it Join Now

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn MoreView all Posts

Источник

How do I find out which version of a driver is included in a kernel?

I need to find out which driver/module version is contained in a kernel which isn’t installed. Is there a document in the source that contains this or something listed online that haven’t been able to find?

You’re going at this the wrong way. Read this. Use the tools I listed in the troubleshooting section, then from the output tell us what isn’t working.

@eyoung100 It isn’t a matter of troubleshooting. I was asked by one of our dedicated Red Hat resources which driver version is provided by the latest kernel found at kernel.org. Again, this isn’t for running kernels. I know how to obtain that information. I need to know how to determine what a kernel will provide prior to installation. Release notes that list driver versions or similar documentation.

@michas the fnic driver. I was asked to determine which driver version is provided in the source downloaded from kernel.org.

2 Answers 2

You can use the modinfo command to give you all kind of information about a given module.

$ modinfo bluetooth filename: /lib/modules/3.17.4-1-ARCH/kernel/net/bluetooth/bluetooth.ko.gz alias: net-pf-31 license: GPL version: 2.19 description: Bluetooth Core ver 2.19 author: Marcel Holtmann srcversion: 4D63C2C41C55E984E7057A5 depends: rfkill,crc16 intree: Y vermagic: 3.17.4-1-ARCH SMP preempt mod_unload modversions parm: disable_esco:Disable eSCO connection creation (bool) parm: disable_ertm:Disable enhanced retransmission mode (bool) 

However most of the time you will not find any explicit version, because the module is simply the one contained in your kernel source tree.

Источник

How to get the nvidia driver version from the command line?

For debugging CUDA code and checking compatibilities I need to find out what nvidia driver version for the GPU I have installed. I found How to get the cuda version? but that does not help me here.

11 Answers 11

Using nvidia-smi should tell you that:

bwood@mybox:~$ nvidia-smi Mon Oct 29 12:30:02 2012 +------------------------------------------------------+ | NVIDIA-SMI 3.295.41 Driver Version: 295.41 | |-------------------------------+----------------------+----------------------+ | Nb. Name | Bus Id Disp. | Volatile ECC SB / DB | | Fan Temp Power Usage /Cap | Memory Usage | GPU Util. Compute M. | |===============================+======================+======================| | 0. GeForce GTX 580 | 0000:25:00.0 N/A | N/A N/A | | 54% 70 C N/A N/A / N/A | 25% 383MB / 1535MB | N/A Default | |-------------------------------+----------------------+----------------------| | Compute processes: GPU Memory | | GPU PID Process name Usage | |=============================================================================| | 0. Not Supported | +-----------------------------------------------------------------------------+ 

In my centos 6.4 system, it gives me error as «-bash: nvidia-smi: command not found». What might be the problem ?

@Shyamkkhadka Likely something wrong with your PATH. You could try to find nvidia-smi like so: locate nvidia-smi

@BrendanWood, with locate command it shows blank output. I suspect if it has no gpu hardware either. Because it is HPC. And I am accessing it from remote, with ssh.

@Shyamkkhadka Yes, that’s probably it. HPC generally don’t have GPUs unless they are supposed to be a GPU cluster. You can check available hardware with lspci . For example: stackoverflow.com/questions/10310250/…

Читайте также:  Rockstar social club linux

@BrendanWood, As suggested in your link, when I did «lspci | grep VGA». It shows output as «lspci | grep VGA 01:03.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] ES1000 (rev 02)». So I think it has GPU hardware.

On any linux system with the NVIDIA driver installed and loaded into the kernel, you can execute:

cat /proc/driver/nvidia/version 

to get the version of the currently loaded NVIDIA kernel module, for example:

$ cat /proc/driver/nvidia/version NVRM version: NVIDIA UNIX x86_64 Kernel Module 304.54 Sat Sep 29 00:05:49 PDT 2012 GCC version: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 

Or if you have Bumblebee installed (due to NVIDIA Optimus dual GPU), then run this instead: «optirun cat /proc/driver/nvidia/version»

This is especially useful when the output of nvidia-smi is: Failed to initialize NVML: GPU access blocked by the operating system

In my centos 6.4 system, I don’t have directory nvidia inside /proc/driver. What might be the problem ? Due to this, I am not able to see my nvidia driver version.

Also useful when you get the output Failed to initialize NVML: Driver/library version mismatch from nvidia-smi .

root@nyx:/usr/src# modinfo nvidia|grep version: version: 331.113 

On my system the module was named nvidia_XXX corresponding to the major driver series I had installed, and since modinfo doesn’t support wildcards or partial name matches I had to do this modinfo $(find /lib/modules/$(uname -r) -iname nvidia_*.ko | head -1) | grep ^version: which returns the correct major and minor driver version.

On ubuntu 18.04 my version of modinfo has a —field command line option. So you can skip the grep: modinfo nvidia —field version . Also, in ubuntu 16.04 this doesn’t seem to work. I always get ERROR: Module nvidia not found .

modinfo shows a different version from the /proc/driver/nvidia/version file. I suppose it reads the version from the module file, not from the one actually in use. I just installed the new driver and I still have to reboot.

cd \Program Files\NVIDIA Corporation\NVSMI

nvidia-smi

nvidia-smi --query-gpu=driver_version --format=csv,noheader --id=0 

returns result as a string that doesn’t require further parsing like: 470.82.00

In case nvidia-smi is not available for some reason, information can be obtained by calling into driver APIs. Driver libraries can be loaded using Python ctypes library.

[NOTE: I am not deleting my answer on purpose, so people see how not to do it]

me@over_there:~$ dpkg --status nvidia-current | grep Version | cut -f 1 -d '-' | sed 's/[^.,0-9]//g' 260.19.06 

you will get the version of the nVIDIA driver package installed through your distribution’s packaging mechanism. But this may not be the version that is actually running as part of your kernel right now.

That doesn’t tell you what version of the driver is actually installed and in use by the kernel. Use the proc file system to see that. Also this only works in debian style distributions.

@Framester: You totally gamed the system! I just gave you another +1 on a useful wrong answer. you cunning devil 🙂

Читайте также:  Uid как узнать linux

To expand on ccc’s answer, if you want to incorporate querying the card with a script, here is information on Nvidia site on how to do so:

Also, I found this thread researching powershell. Here is an example command that runs the utility to get the true memory available on the GPU to get you started.

# get gpu metrics $cmd = "& 'C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi' --query-gpu=name,utilization.memory,driver_version --format=csv" $gpuinfo = invoke-expression $cmd | ConvertFrom-CSV $gpuname = $gpuinfo.name $gpuutil = $gpuinfo.'utilization.memory [%]'.Split(' ')[0] $gpuDriver = $gpuinfo.driver_version 

Источник

How to find network card driver name and version on Linux

Question: An Ethernet network interface card is attached to my Linux box, and I would like to know which network adapter driver is installed for the NIC hardware. Is there a way to find out the name and version of a network card driver for my network card?

For network interface card (NIC) hardware to operate properly, you need a suitable device driver for the NIC hardware (e.g., ixgbe driver for Intel NICs). A NIC device driver implements a hardware-independent common interface between the Linux kernel and the NIC, so that packets can be moved between the kernel and the NIC. While some drivers may be statically built in the kernel, most drivers for modern NICs are dynamically loaded as kernel modules.

When you are troubleshooting a NIC hardware problem, one thing you can do is to check whether a correct network adapter driver is installed properly. In this case, you need to know which kernel module is your NIC driver.

There are several ways to find the name/version of an Ethernet card driver on Linux.

Method One: dmesg

The first method is to to check dmesg messages. Since the kernel loads necessary hardware drivers during boot, dmesg output should tell if an Ethernet card driver is installed.

The above output shows that a driver named tg3 is loaded in the kernel.

If you want to know more detail about this driver (e.g., driver version), you can use modinfo command.

If dmesg does not print any information about Ethernet driver, that means no suitable network device driver is available on your system.

Method Two: ethtool

The second method is to use the ethtool command. To find out the driver name for an interface eth0 , run the following.

Method Three: lshw

Another useful tool for NIC driver information is lshw . Type the following command to get detailed information about available Ethernet card(s) and their driver.

In the lshw output, look for the capabilities line, and examine driver and driverversion in the line.

If no suitable NIC driver is installed on your system, the driver field will remain empty.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Источник

Оцените статью
Adblock
detector