Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to analyze the interactive data between openvswitch ovs-vsctl commands and ovsdb-server

Shulou Source: shulou.com Published: 2022-06-01 02:21:15 10月01日 Update

This article is about how to analyze the interactive data between openvswitch ovs-vsctl commands and ovsdb-server. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.

Use strace to analyze ovs-vsctl commands system call

Strace ovs-vsctl list-br

Some of the output is as follows, so ovs-vsctl communicates with ovsdb-server through unix socker (/ var/run/openvswitch/db.sock)

Socket (AF_UNIX, SOCK_STREAM, 0)

Connect (3, {sa_family=AF_UNIX, sun_path= "/ var/run/openvswitch/db.sock"}, 31) = 0

How to monitor unix socket communication data

No information was found for "monitoring unix socket communication data through tcpdump".

The following describes how to monitor unix socket communication data through socat.

1. Start socat

Socat-T100-v UNIX-LISTEN:/tmp/duplicatesocket,mode=777,reuseaddr,fork UNIX-CONNECT:/var/run/openvswitch/db.sock

two。 When you execute the ovs-vsctl command, set the-- db parameter

Ovs-vsctl-db unix:/tmp/duplicatesocket list-br

Socat output part of the result

> 2017-04-26 10 method 04method 24.271932 length=56 from=0 to=55 {"id": 0, "method": "get_schema", "params": ["Open_vSwitch"]} < 2017-04-26 10purl 04vis24.273208 length=8192 from=0 to=8191 {"id": 0, "result": {"cksum": "2211824403 22535", "name": "Open_vSwitch", "version": "7.12.1" "tables": {"Controller": {"columns": {"connection_mode": {"min": 0, "key": {"type": "string", "enum": ["set", ["in-band", "out-of-band"]}, "is_connected": {"ephemeral": true, "type": "boolean"}, "local_gateway": {"type": {"min": 0, "key": "string"}} "enable_async_messages": {"type": {"min": 0, "key": "boolean"}}, "external_ids": {"type": {"max": "unlimited", "min": 0, "key": "string", "value": "string"}}, "other_config": {"type": {"max": "unlimited", "min": 0, "key": "string", "value": "string"}}, "status": {"ephemeral": true "type": {"max": "unlimited", "min": 0, "key": "string", "value": "string"}}, "local_netmask": {"type": {"min": 0, "key": "string"}}, "controller_burst_limit": {"type": {"min": 0, "key": {"minInteger": 25, "type": "integer"}}, "local_ip": {"type": {"min": 0 "key": "string"}}, "controller_rate_l above is how to analyze the interactive data between openvswitch ovs-vsctl commands and ovsdb-server. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Data commands communications analysis parts monitoring content more knowledge articles output utility parameters that is work meetings articles look knowledge points systems results Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB MySQL Shulou Tech Info Apple Docker