Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i find out the nics & drivers installed in solaris

Status
Not open for further replies.

keshavprabhu

Technical User
Aug 20, 2003
10
US
Hello,

In what way can I find the list of NICs present in my system? I would like to do it from a user level.

(In linux, pcitweak -l gives the list with class 2 being the network controllers, alternately, /sbin/lspci lists out these network controllers)

It is not necessary that the NICs are configured, just that the OS has recognised the hardware/there is a driver present for that card.

Any help in this regard?

Rgds,
- Keshav.

 
ifconfig -a
shows currently mapped network devices.

'prtconf' and 'prtconf -D' show devices and their drivers on the system.

it is up to you to know which devices/drivers are network devices though ...
 
Hello,

ifconfig -a does not show me the devices unless i configure it. I need the list of all the NICs - mapped or unmapped.

prtconf shows me the list all right, but how do i recognise the network driver? currently i get the output as -
....
pci8086,2418, instance #0 (driver name: pci_pci)
pci11ad,c001, instance #0 (driver name: mxfe)
pci1028,b4, instance #0 (driver name: elxl)
....
my prog cannot tell from this if elxl or mxfe is a nic.

The problem statement is -
There is a solaris system with x nic cards and their corresponding drivers. I do not know the nic names/driver files associated with them. I would like to probe the system(possibly pci config space) and get only the nic details.

Hope it is more clear now.

Rgds,
- Keshav.
 
well elxl is the network driver in this case ... and since it's instance #0 the device should be /dev/elxl0 ...

i can't seem to find any other way atm for working out if a device is a network device.
 
Not sure how far you wanting to look, but you can use the following:

sysdef -d
or
prtconf -D

Both will give you the namelist trees.

 
dmesg should tell you what NICs are discovered at boot time.
> /bin/dmesg

-jax!
 
hmm ... i guess that could work ...

grep '"ether"' /var/adm/messages*

but i don't know if that message appears before or after it's plumbed ...

problem with dmesg is that if you've had loads of messages it doesn't show you them all, and if you have log rotation it doesn't show you the other logs (i believe).
 
Hi guys,

Thanks .. I could get some help from prtconf -pv. This gives loads of information though. I found that there is a class-code for network drivers - 2!!!! same as that on linux .. it means something which is common to all.

prtconf uses openprom - it opens /dev/openprom and then reads everything it prints from there. I was trying to use the openprom(check out man openprom), was not very successful though. Anyone here has used it?

I think even sysdef uses the /dev/openprom.

Rgds,
- Keshav.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top