暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

跟随Openvswitch数据库,才能玩遍OVS

刘超的通俗云计算 2017-06-30
514

Openvswitch功能繁多,使用复杂,从哪里看起呢?


根据上一节Openvswitch总体架构与代码结构中提到的一样,Openvswitch是有一个数据库的。


数据库表结构如下图所示:




如果你想看数据的内容,可以通过cat /etc/openvswitch/conf.db,我们会发现它是json格式的。


数据库可以通过ovsdb-client dump将数据库内容打印出来。


打印出来后,是如下的一个json格式。



于是我们可以跟随着这个数据库表,玩遍Openvswitch。


其中Open_vSwitch表是数据库的根,它的详细结构如下:



这里面有全局的配置项:

  • other_config : stats-update-interval :将统计信息写入数据库的间隔时间

  • other_config : flow-limit :在flow table中flow entry的数量

  • other_config : n-handler-threads :用于处理新flow的线程数

  • other_config : n-revalidator-threads :用于验证flow的线程数.

  • other_config : enable-statistics 是否统计

    • statistics : cpu 统计cpu数量,线程

    • statistics : load_average system load

    • statistics : memory 总RAM,swap

    • statistics : process_NAME :with NAME replaced by a process name,统计memory size, cpu time等 

    • statistics : file_systems:mount point, size, used


还可以通过UUID指向其他表:

  • bridge表

  • SSL表

  • Manager表


接下来就可以开启Openvswitch之旅了:

  • 玩转Openvwitch第一站:Manager和SSL

  • 玩转Openvwitch第二站:Bridge和Controller

  • 玩转Openvwitch第三站:Bridge和sFlow,NetFlow/IPFIX

  • 玩转Openvwitch第四站:Bridge和Mirror

  • 玩转Openvwitch第五站:Port和VLAN

  • 玩转Openvwitch第六站:Port和Bond

  • 玩转Openvwitch第七站:Port和QoS

  • 玩转Openvwitch第八站:Interface和Tunnel

  • 玩转Openvwitch第九站:直接操作DB

  • 玩转Openvwitch第十站:Flow Table

  • 玩转Openvwitch之冲刺篇



文章转载自刘超的通俗云计算,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论