1

I have a number of systems (with quite varying type, generation and architecture unfortunately).

I need to create a list of fiber cards on these varying systems.

I am able to use prtconf -v, and correlate with prtdiag -v, and if need be luxadm or fcinfo to find this info, but with a large number of systems ahead of me, I am wondering two things.

1, if anyone has a script they've already made for themselves that finds this info.

2, If someone knows a super nifty one liner that would get the info I need out of the above command(s) so I can just script a wrapper on it and not spend a week logging into 4000 boxes.

Again, not so much looking to learn how to find them, (although as always with unix, TMTOWTDI, so your input is welcome), but rather seeking a script that will hopefully take some work off me.

  • TIL "TMTOWTDI". – Bratchley May 8 '13 at 0:07
0

Not sure if this is what you intended:

But a way to check all the CONNECTED hba's is this:

for i in ls /dev/rdsk/*s2; do luxadm display $i 2>&1|grep WWN|awk '{print $5}'; done |sort|uniq |xargs fcinfo hba-port -l |egrep 'Model'

Or to get all the part-number of a system regarding HBA cards:

fcinfo hba-port|egrep 'Model'|uniq

I think this will do what you need, just wrapper it to connect to the target systems and you will get the full list of HBA that you have in your servers.

HTH

0

One of two things will be true: 1) You'll have a lot of servers 2) You won't have a lot of servers (help me if I overlooked a possibility).

If you don't have a lot of servers, you'd probably be able to do the hardware inventory by hand and wouldn't be asking this. If you do have a sizeable deployment then you really should look into getting something like puppet going on them. Basically, you need something that will let you deploy files and execute remote commands en masse. Once you get that, most administrative tasks get a lot simpler.

You can save time by just having each node email its prtdiag to you and you can compile the inventory with copy/paste at your leisure.

Obviously, setting up puppet for this one task may be overkill but I would imagine that going forward this will definitely save you a lot more time and take the pressure off you having to find some one liner to do what you want. As these things come up you just deploy a script to /tmp and execute it.

0

What version of Solaris? If 10 or newer, you might want to look into fmtopo and see if any of it's options will do what you need them to. (/usr/lib/fm/fmd/fmtopo)

I'm not sure it provides the level of detail you need, though, as it won't enumerate WWNs, to the best of my knowledge.

0

I finally found what was to me, the perfect answer to my own question.

The currently undocumented option "-L" for dladm show-phys does exactly what I needed.

example:

root@server1:/tmp# dladm show-phys -L

LINK DEVICE LOC net0 igb0 /SYS/MB

net1 igb1 /SYS/MB

net2 ixgbe0 PCI-EM2

net3 ixgbe1 PCI-EM2

net4 ixgbe2 PCI-EM10

net5 ixgbe3 PCI-EM10

net21 ibp2 PCI-EM1/PORT1

net22 ibp3 PCI-EM1/PORT2

net23 ibp4 PCI-EM9/PORT1

net24 ibp5 PCI-EM9/PORT2

root@server1:/tmp#

  • Nit - the -L option to dladm show-phys IS documented. It's definitely there in my copy of the Solaris 11 FCS dladm(1m) manpage. I also know it's there because I filed the RFE to get that feature in the first place! Another command you might want to look into is mpathadm(1m). – James McPherson Jun 24 '14 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.