Re: network interface to driver and pci slot mapping

From: Jean Tourrilhes
Date: Thu Nov 11 2004 - 16:58:31 EST

Anthony Samsung wrote :
> Given an interface name (like eth0), how do I determine:
> The name of the driver (module) for this interface.
> The PCI address for this interface, if relevant.
> ?

ethtool -i. Unfortunately, not yet implemented in all driver,
but Jeff is on the case.
There might also be a sysfs way to do it, but it probably
involve lot's a grep or similar magic.

> I need something that works non-destructively on a live system, that
> isn't broken by nameif, and has a strong chance of producing a correct
> result. In particular, parsing syslog is out. There's no consistency
> in the format of messages and there's no guarantee the logs from
> bootup will still be around. And the interface may have been renamed
> since then.

ifrename allow you to rename interfaces based on both driver
name and PCI address, so another option is to make sure interface
names are consistent and meaningful.

Have fun...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at