Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report