On Tue, May 26, 2009 at 12:10 AM, Andre van Eyssen <andre at purplecow.org> 
wrote:
> All,
>
> I was thinking today, after another request to translate ports on the back
> of a host into physical slots, that it would be very cool for the userbase
> to be able to run a command like
>
> # dladm show-slot
> qfe0 ? ? ? ? ? ?PCI3 ? ? ? ? ? ?"/pci at 8,700000/pci at 2/SUNW,qfe at 0,1"
> qfe1 ? ? ? ? ? ?PCI3 ? ? ? ? ? ?"/pci at 8,700000/pci at 2/SUNW,qfe at 1,1"
> qfe2 ? ? ? ? ? ?PCI3 ? ? ? ? ? ?"/pci at 8,700000/pci at 2/SUNW,qfe at 2,1"
> qfe3 ? ? ? ? ? ?PCI3 ? ? ? ? ? ?"/pci at 8,700000/pci at 2/SUNW,qfe at 3,1"
> ge0 ? ? ? ? ? ? ONBOARD ? ? ? ? "/pci at 8,600000/network at 1"
> (etc)
>
> This should certainly be do-able for any Sun manufactured machines, and
> would be a nice touch.
>
> The main idea here is that way a single, simple command will yield
> understandable-to-most results without the need to understand too much.
> HP-UX has "lanscan" and "ioscan" to provide some degree of similar
> information.
>
> Extra points for something that covers host bus adapters as well.
>
> Comments, team?

I suspect libtopo could be used to provide the needed information,
however it's completely undocumented and even the comments seem to
assume you already understand how to use the lib, so I can't offer
much in the way of implementation details.

What'd be nice is to go even further, and not just network devices,
but having the information for controllers as well would be good.  It
might even be nice if enough information existed that people could
contribute modules for 3rd party servers as well (obviously might not
work in all cases, but for a lot of stuff it might).

Reply via email to