Here’s a nice quick one-liner garnered from work to quickly find out which VIO servers and vhosts your VIO client LPAR is using. In my case I needed to be the root user to run this and it’s run on the client itself…

echo "cvai"|kdb|grep vscsi

Output would be similar to…

read vscsi_scsi_ptrs OK, ptr = 0xF1000000C015F398
vscsi0 0x000007 0x0000000000 0x0 vio022->vhost89
vscsi1 0x000007 0x0000000000 0x0 vio023->vhost89

So in this case we are using VIO’s vio022 and vio023. Both VIO’s are using vhost89 for their virtual adapter mappings.

We can also see which vfchosts (NPIV) are used for each virtual adapter (fcs) using…

echo "vfcs"|kdb|grep fcs

Update : I found this does not work for AIX7, but fear not, instead run:

echo "vfcs" | kdb

This will show you something like this, which will also give you the VIOS that are being used:

           START              END <name>
0000000000001000 0000000005860000 start+000FD8
F00000002FF47600 F00000002FFDF9C8 __ublock+000000
000000002FF22FF4 000000002FF22FF8 environ+000000
000000002FF22FF8 000000002FF22FFC errno+000000
F1000F0A00000000 F1000F0A10000000 pvproc+000000
F1000F0A10000000 F1000F0A18000000 pvthread+000000
read vscsi_scsi_ptrs OK, ptr = 0x0
(0)> vfcs
fcs0      0xF100010032A62000  0x0008  vioserver1vfchost44 0x01    0x0000
fcs1      0xF1000100331DD000  0x0008  vioserver2vfchost44 0x01    0x0000
fcs2      0xF100010033952000  0x0008  vioserver1vfchost45 0x01    0x0000
fcs3      0xF1000100340CA000  0x0008  vioserver2vfchost45 0x01    0x0000

About troyski

I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation