Search This Blog

Thursday, May 27, 2010

Exploring Hardware Devices

A snapshot of all connected devices is maintained by HAL: Hardware Abstraction Layer
hal-device lists all devices in text mode
hal-device-manager displays all devices on a graphical window
lspci and lsusb list devices connected to the PCI and USB buses, respectively
The /proc and /sys filesystems also contain bus and device specific information


Hardware devices can be monitored in a number of different ways. The /proc filesystem has historically been the main method, with files such as /proc/devices, /proc/interrupts, /proc/iomem and /proc/ ioports. Buses such as the PCI and USB bus are also exposed through the /proc/bus/ directory.

To make the /proc entries more readable, utilities such as lspci and lsusb are also provided.

More recently, however, a new layer has been provided to expose hardware information: HAL (Hardware Abstraction Layer). HAL continuously maintains a snapshot of all hardware devices currently connected to the system. This snapshot may be monitored in text mode using the hal-device command, or in graphical mode with the hal-device- manager application.
# hal-device
# lspci
# lsusb

Much of the information provided through HAL can also be accessed from the /sys filesystem.

No comments: