How to Seize Information About Your SEAs

Edit: Still a useful technique, some links no longer work.

Originally posted May 16, 2017 on AIXchange

Shared Ethernet adapters have matured as a technology. A few years ago when SEAs were new and a little more esoteric, they were occasionally misconfigured, leading to network issues. Now that we have more experience with them, I don’t hear about many problems with SEAs these days.

As is mentioned in the Power Implementation Quality Standard, you may find that you’re more interested in SEA load sharing because it allows you to utilize all of your 10G interfaces and switch ports. Of course a lot of folks have eschewed explicitly setting control channels and are just using the default control channel. As I said, SEAs are easier to use now.

Nonetheless, the question still comes up with both new and legacy systems running SEAs in their VIO servers about which interface is the primary and which is the backup at any given time.

Recently, a client wanted to know the status of their interfaces. This has always been my go-to command to see which SEA is active:

    netstat –cdlistats | grep “State:” | grep –v “Operation State” | grep –v “Stream State”

In this case though, it wasn’t sufficient. My client has multiple SEAs and multiple physical and virtual interfaces, but the output from this command only lists the status of the interfaces; there’s no way to tell which SEA is which:

          padmin $ netstat –cdlistats | grep “State:” | grep –v “Operation State” | grep –v “Stream State”
LAN State: Operational
    State: PRIMARY
LAN State: Operational
LAN State: Operational
    State: BACKUP
LAN State: Operational
LAN State: Operational
    State: PRIMARY
LAN State: Operational
LAN State: Operational

The following command will tell you about all your virtual interfaces, including those that are part of an SEA and if they’re available. You can also find out individual adapter IDs and location codes of backing devices:

    lsmap -all -net

To get the names of the adapters that are SEAs, simply add this flag:

    lsmap -all -net -field sea

You’ll see this output:

    SEA        ent1

    SEA        ent2

    SEA        ent3

By the way, if you’re looking for information about other fields that might be of interest to you, check out this document. It also explains how to change the delimiter.

Ultimately though, my client had a specific issue to address. I took the output from the lsmap -all -net command and created a for loop. Using the awk command, I isolated the entX value that corresponded to the SEAs on the system.

This was the loop I came up with, along with the output that I saw:

for i in `lsmap –all –net –field sea | awk ‘{print $2}’`
do
echo $i ; entstat –all $i | grep State
done

padmin$ for i in `lsmap -all -net -field sea | awk ‘{print $2}’`
> do
> echo $i ; entstat -all $i | grep State
> done
ent1
    State: PRIMARY
LAN State: Operational
LAN State: Operational

ent2
    State: BACKUP
LAN State: Operational
LAN State: Operational

ent3
    State: PRIMARY
LAN State: Operational
LAN State: Operational

Obviously you can get a lot more information with entstat, but this is what I needed.

How do you determine which VIO server is primary and which is the backup in your environment?