Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Measure VM traffic using neutron and ovs-ofctl

Hi, I want to measure the number of packets transmitted my a VM to another VM. I used "ovs-ofctl dump-flows br-int", "ovs-ofctl dump-ports br-int <port>". this displays the port statistics as:

# ovs-ofctl dump-ports br-int qr-ec64c117-d9
OFPST_PORT reply (xid=0x4): 1 ports
  port  2: rx pkts=44190, bytes=89463037, drop=0, errs=0, frame=0, over=0, crc=0
           tx pkts=78572, bytes=8208007, drop=0, errs=0, coll=0

How do I know the port qr-ec64c117-d9 is connected to which VM? "neutron port-list" shows the list of ports with IDs. But these IDs are different from the ports recognized by OVS.

# neutron port-list
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                            |
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
| 2e75e0a0-26ae-473f-bb38-e781e8110124 |      | fa:16:3e:a7:71:95 | {"subnet_id": "3169e2fd-a3bc-44ea-8e17-ef297c6157d9", "ip_address": "50.50.1.6"}     |
| 4ac2b3c3-0e41-4496-8cdd-1a7293ef4683 |      | fa:16:3e:12:a6:cc | {"subnet_id": "3169e2fd-a3bc-44ea-8e17-ef297c6157d9", "ip_address": "50.50.1.5"}     |

Please guide me how to map the port IDs with ports of OVS. Is there any other way to get the VM communication statistics?

Thanks,