How to detect the presence of a device driver module in Linux

Source: Internet
Author: User
Tags system log dmesg

Whether a device driver in a Linux system is properly installed is a few aspects of general inspection:
1, System log. Embedded system is more direct DMESG, see there is no device keyword-related error information (universal system can check the/var/log/messages file).
2. The loaded module. Check the module load list for modules with no associated devices.
Lsmod
3. List of devices. Check that there are no related devices in the loaded device
Cat/proc/devices
4, equipment entrance. If all of the above checks are normal, you will also need to check if the device entry has been created in the device directory
Ls/dev/xxxx

If the above checks are normal (the driver module has been loaded normally, the device inlet is present and there is no error), and the device is not working properly, it is necessary to check whether the device driver matches the chip or whether the hardware resource configuration in the drive corresponds to the hardware.

Here's how to check for specific hardware:
View CPU Information: Cat/proc/cpuinfo
View Board information: CAT/PROC/PCI
View PCI information: LSPCI (more intuitive than CAT/PROC/PCI)
Viewing memory information: Cat/proc/meminfo
Viewing USB devices: Cat/proc/bus/usb/devices
Viewing the keyboard and mouse: Cat/proc/bus/input/devices
View system hard disk information and usage: Fdisk & disk-l & DF
View Interrupt Request (IRQ) for each device: cat/proc/interrupts
View system architecture: Uname-a
To develop a driver in a Linux environment, the first thing to do is to detect new hardware and then develop the driver.
Common commands are organized as follows:
probing for new hardware with hardware detector kudzu: Service kudzu start (or restart)
View CPU information: Cat/proc/cpuinfo
View Board information: Cat/proc /PCI
Viewing PCI information: LSPCI (more intuitive than CAT/PROC/PCI)
View memory information: Cat/proc/meminfo
View USB device: Cat/proc/bus/usb/devices
View keyboard and mouse: cat/proc/bus/input/devices
View system hard disk information and usage: Fdisk & disk-l & DF
View Interrupt Request (IRQ) for each device: cat/proc/ Interrupts
View system architecture: UNAME-A
Dmidecode View hardware information, including BIOS, CPU, memory, etc.
DMESG | More view hardware information


For files in "/proc", you can use the File View command to browse its contents, and the file contains system-specific information:
Cpuinfo Host CPU Information
DMA Host DMA Channel information
Filesystems File System Information
Interrupts host interrupt Information
Ioprots host I/O port number information
Meninfo Host Memory Information
Version Linux memory release information

How to detect the presence of a device driver module in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.