Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. **DB**
  2. ```
  3. ovs-vsctl list open_vswitch
  4. ovs-vsctl list interface
  5. ovs-vsctl --columns=ofport,name list Interface
  6. ovs-vsctl --columns=ofport,name --format=table list Interface
  7. ovs-vsctl -f csv --no-heading --columns=_uuid list controller
  8. ovs-vsctl --format=table --columns=name,mac_in_use find Interface name=br-dpdk1
  9. ovs-vsctl get interface vhub656c3cb-23 name
  10.  
  11. ovs-vsctl set port vlan1729 tag=1729
  12. ovs-vsctl get port vlan1729 tag
  13. ovs-vsctl remove port vlan1729 tag 1729
  14.  
  15. # not sure this is best
  16. ovs-vsctl set interface vlan1729 mac='5c\:b9\:01\:8d\:3e\:9d'
  17.  
  18. ovs-vsctl clear Bridge br0 stp_enable
  19.  
  20. ovs-vsctl --may-exist add-br br0 -- set bridge br0 datapath_type=netdev
  21. ovs-vsctl --if-exists del-br br0
  22. ```
  23. **Flows**
  24. ```
  25. ovs-ofctl -O OpenFlow13 dump-flows br-int | cut -d',' -f3,6,7-
  26.  
  27. ovs-appctl dpif/show
  28. ovs-ofctl show br-int | egrep "^ [0-9]"
  29.  
  30. ovs-ofctl add-flow brbm priority=1,in_port=11,dl_src=00:05:95:41:ec:8c/ff:ff:ff:ff:ff:ff,actions=drop
  31. ovs-ofctl --strict del-flows brbm priority=0,in_port=11,dl_src=00:05:95:41:ec:8c
  32.  
  33. # kernel datapath
  34. ovs-dpctl dump-flows
  35. ovs-appctl dpctl/dump-flows
  36. ovs-appctl dpctl/dump-flows system@ovs-system
  37. ovs-appctl dpctl/dump-flows netdev@ovs-netdev
  38. ```
  39. **DPDK**
  40. ```
  41. ovs-appctl dpif/show
  42. ovs-ofctl dump-ports br-int
  43. ovs-appctl dpctl/dump-flows
  44. ovs-appctl dpctl/show --statistics
  45. ovs-appctl dpif-netdev/pmd-stats-show
  46. ovs-appctl dpif-netdev/pmd-stats-clear
  47. ovs-appctl dpif-netdev/pmd-rxq-show
  48. ```
  49. **Debug log**
  50. ```
  51. ovs-appctl vlog/list | grep dpdk
  52. ovs-appctl vlog/set dpdk:file:dbg
  53. ```
  54. **Misc**
  55. ```
  56. ovs-appctl list-commands
  57. ovs-appctl fdb/show brbm
  58.  
  59. ovs-appctl ofproto/trace br-int in_port=6
  60.  
  61. ovs-appctl ofproto/trace br-int tcp,in_port=3,vlan_tci=0x0000,dl_src=fa:16:3e:8d:26:61,dl_dst=fa:16:3e:0d:f5:e6,nw_src=10.0.0.26,nw_dst=10.0.0.9,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=0,tp_dst=22,tcp_flags=0
  62.  
  63. # history
  64. ovsdb-tool -mm show-log /etc/openvswitch/conf.db
  65.  
  66. top -p `pidof ovs-vswitchd` -H -d1
  67.  
  68. # port and dp cache stats
  69. ovs-appctl dpctl/show -s
  70. ovs-appctl memory/show
  71. ovs-appctl upcall/show
  72.  
  73. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement