Skip to content

Commit 3fa30c3

Browse files
scripts: log-collector: Add ovs open-flows and group dump to log results
Signed-off-by: Lorenzo Bianconi <[email protected]>
1 parent 4ae0b40 commit 3fa30c3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ovn-fake-multinode-utils/scripts/log-collector.sh

+9
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,27 @@
22

33
host=$1
44
node_name=$2
5+
limit=10
56

67
mkdir /tmp/${host}
78
pushd /tmp
89
for c in $(podman ps --format "{{.Names}}" --filter "name=${node_name}"); do
910
mkdir ${host}/$c
1011
podman exec $c ps -aux > ${host}/$c/ps
1112
podman exec $c bash -c 'touch /tmp/process-monitor.exit && sleep 5'
13+
podman exec $c bash -c 'ovs-ofctl dump-flows br-int > /tmp/open-flows.log'
1214
podman cp $c:/var/log/ovn/ovn-controller.log ${host}/$c/
1315
podman cp $c:/var/log/openvswitch/ovs-vswitchd.log ${host}/$c/
1416
podman cp $c:/var/log/openvswitch/ovsdb-server.log ${host}/$c/
1517
podman cp $c:/etc/openvswitch/conf.db ${host}/$c/
1618
podman cp $c:/var/log/process-stats.json ${host}/$c/
19+
podman cp $c:/tmp/open-flows.log ${host}/$c/
20+
done
21+
22+
# Dump ovs groups just for latest ${limit} nodes
23+
for c in $(podman ps --format "{{.Names}}" --filter "name=${node_name}" --last "${limit}"); do
24+
podman exec $c bash -c 'ovs-ofctl dump-groups br-int > /tmp/groups.log'
25+
podman cp $c:/tmp/groups.log ${host}/$c/
1726
done
1827

1928
for c in $(podman ps --format "{{.Names}}" --filter "name=ovn-central"); do

0 commit comments

Comments
 (0)