[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Corellating hardware with drivers



On Wed, Nov 22, 2006 at 11:26:13AM -0500, Bradley Alexander wrote:
> I am hoping there is an easy way to do this. I am looking for a way to
> map drivers to hardware in a box. I have been tasked with a project at
> work in which I need to display the driver associated with a piece of
> hardware in a box. The problem is that we have a variety of platforms,
> including Dells, and a number of varieties of homebrew boxes, running
> everything from RedHat 6.2 (2.2 kernel) and RH7.3, to Debian/sid and
> CentOS 4.x.
> 
> Does someone know where in /proc information like this would live and
> how to extract it?
> 

I don't think that what you're looking for exists in the /proc fs.

As each module (whether loadable or built into the kernel) finds
hardware, it prints out info and it goes to dmesg and /var/log/syslog.

Unfortunaly, dmesg is a ring buffer so after a while the boot messages
are lost (this is why there's /var/log/dmesg to store the boot up
snapshot), and syslog is a kitchen sink of all system messages.

There are pci utilities that include lspci to show what hardware is
attached to the pci bus, and similar for usb.

I'm not on my Etch box right now.  Etch uses udev by default and I don't
know if udev itself logs the kind of info you need, or if there is a way
to do this.

I'll be interested to see what others come up with but I would probably
do a brute-force approach and write a script in python that scanned
/var/log/syslog and rejected lines that I knew weren't hardware.

I wonder if the discover package (or udev) would help by logging this.

Good luck.

Doug.



Reply to: