Spotlight | Reviews | Current Issue | Newsletter | Subscribe | Contact |
Departments

user friendly

  linuxpromagazine.com » Issues » 2005 » 60 » DISCOVERY SCRIPTS  

Print this page. Recommend
Slashdot it! Delicious Digg

Bash-based hardware detection for PCI and USB

DISCOVERY SCRIPTS

Author(s): MIRKO DÖLLE

If you need fast answers for what's inside, you can use a Bash script to obtain an inventory of hardware on your Linux system.

If you operate outside of the mainstream distributions or compile your own Linux system, whether an em-bedded Linux, a rescue system, or just a do-it-yourself distro, you need to solve the issue of finding the right kernel modules for your collection of hardware. Armed with some background know-ledge, you can use almost any programming language to create a system for PCI or USB hardware detection. In this article, I’ll show you a method for obtaining information about devices on your Linux system with a Bash script. Using sysfs or proc, you can find all the information you need about the manufacturer, device, and device class just by asking the kernel.


Read full article as PDF »


Comments


Print this page. Recommend
Slashdot it! Delicious Digg
Wherever you go...

...Linux Magazine goes with you!

Check out the advantages of a Digital Subscription:

  • Access articles by downloading PDFs,
  • find the Linux solutions you need with an easy keyword search,
  • maintain your own paperless archive...

more...

 

In the US and Canada, Linux Magazine is known as Linux Pro Magazine.
Entire contents © 2009 [Linux New Media USA, LLC]
Linux New Media web sites:
North America: [Linux Pro Magazine]
UK/Worldwide: [Linux Magazine]
Germany: [Linux-Magazin] [LinuxUser] [EasyLinux] [Linux-Community] [Linux-Nachrichten] [Linux Events]
Eastern Europe: [Linux Magazine Poland] [Linux Community Poland] [Darmowe Programy Poland] [Open Source DVD Poland] [Linux Magazin Romania]
International: [Linux Magazine Brazil] [Linux Magazine Spanish]
Corporate: [Linux New Media AG]