Hi Matt,

For task “OVS collectd interface/port state monitoring”, which parts should be monitored? For example: Bridge, Port.

https://storyboard.openstack.org/#!/story/2002948

https://bugs.launchpad.net/starlingx/+bug/1834512

Bridge "br-phy1"

        Port "br-phy1"

            Interface "br-phy1"

                type: internal

        Port "eth1"

            Interface "eth1"

                type: dpdk

                options: {dpdk-devargs="0000:18:00.1", n_rxq="1"}

        Port "lldp8a3c28ca-7f"

            Interface "lldp8a3c28ca-7f"

                type: internal

 

The command “ovs-ofctl dump-ports-desc $ovs_bridge” can be used with collectd for both OVS and OVS-DPDK. The link status for interfaces can be detected as below:

For OVS:

After pull the cabel:

controller-0:/home/sysadmin# ovs-ofctl dump-ports-desc br-phy0

OFPST_PORT_DESC reply (xid=0x2):

1(enp51s0f3): addr:0c:c4:7a:ff:5f:ef

     config:     0

     state:      LINK_DOWN

     current:    COPPER AUTO_NEG

     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE

     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE

     speed: 0 Mbps now, 1000 Mbps max

2(phy-br-phy0): addr:1a:0a:21:03:6a:1e

     config:     0

     state:      0

     speed: 0 Mbps now, 0 Mbps max

LOCAL(br-phy0): addr:0c:c4:7a:ff:5f:ef

     config:     PORT_DOWN

     state:      LINK_DOWN

     speed: 0 Mbps now, 0 Mbps max

After plug in the cable:

controller-0:/home/sysadmin# ovs-ofctl dump-ports-desc br-phy0

OFPST_PORT_DESC reply (xid=0x2):

1(enp51s0f3): addr:0c:c4:7a:ff:5f:ef

     config:     0

     state:      0

     current:    1GB-FD COPPER AUTO_NEG

     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE

     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE

     speed: 1000 Mbps now, 1000 Mbps max

2(phy-br-phy0): addr:1a:0a:21:03:6a:1e

     config:     0

     state:      0

     speed: 0 Mbps now, 0 Mbps max

LOCAL(br-phy0): addr:0c:c4:7a:ff:5f:ef

     config:     PORT_DOWN

     state:      LINK_DOWN

     speed: 0 Mbps now, 0 Mbps max

 

For OVS-DPDK:

After pull the cabel:

controller-0:/home/sysadmin# ovs-ofctl dump-ports-desc br-phy1

OFPST_PORT_DESC reply (xid=0x2):

1(eth1): addr:3c:fd:fe:da:e8:85

     config:     0

     state:      LINK_DOWN

     current:    AUTO_NEG

     speed: 0 Mbps now, 0 Mbps max

2(lldp8a3c28ca-7f): addr:52:97:0b:a4:ef:23

     config:     0

     state:      0

     current:    10MB-FD COPPER

     speed: 10 Mbps now, 0 Mbps max

LOCAL(br-phy1): addr:3c:fd:fe:da:e8:85

     config:     0

     state:      0

     current:    10MB-FD COPPER

     speed: 10 Mbps now, 0 Mbps max

After plug in the cable:

controller-0:/home/sysadmin# ovs-ofctl dump-ports-desc br-phy1

OFPST_PORT_DESC reply (xid=0x2):

1(eth1): addr:3c:fd:fe:da:e8:85

     config:     0

     state:      0

     current:    10GB-FD AUTO_NEG

     speed: 10000 Mbps now, 0 Mbps max

2(lldp8a3c28ca-7f): addr:52:97:0b:a4:ef:23

     config:     0

     state:      0

     current:    10MB-FD COPPER

     speed: 10 Mbps now, 0 Mbps max

LOCAL(br-phy1): addr:3c:fd:fe:da:e8:85

     config:     0

     state:      0

     current:    10MB-FD COPPER

     speed: 10 Mbps now, 0 Mbps max

 

Best Regards,

Xu, Chenjie