diff --git a/tools/collector/centos/collector.spec b/tools/collector/centos/collector.spec index 40c51c513..136c557c9 100644 --- a/tools/collector/centos/collector.spec +++ b/tools/collector/centos/collector.spec @@ -41,7 +41,7 @@ install -m 755 collect_ceph.sh %{buildroot}%{_sysconfdir}/collect.d/collect_ceph install -m 755 collect_sm.sh %{buildroot}%{_sysconfdir}/collect.d/collect_sm install -m 755 collect_tc.sh %{buildroot}%{_sysconfdir}/collect.d/collect_tc install -m 755 collect_nfv_vim.sh %{buildroot}%{_sysconfdir}/collect.d/collect_nfv_vim -install -m 755 collect_vswitch.sh %{buildroot}%{_sysconfdir}/collect.d/collect_vswitch +install -m 755 collect_ovs.sh %{buildroot}%{_sysconfdir}/collect.d/collect_ovs install -m 755 collect_patching.sh %{buildroot}%{_sysconfdir}/collect.d/collect_patching install -m 755 collect_coredump.sh %{buildroot}%{_sysconfdir}/collect.d/collect_coredump install -m 755 collect_crash.sh %{buildroot}%{_sysconfdir}/collect.d/collect_crash diff --git a/tools/collector/scripts/collect_ovs.sh b/tools/collector/scripts/collect_ovs.sh new file mode 100644 index 000000000..96c3291aa --- /dev/null +++ b/tools/collector/scripts/collect_ovs.sh @@ -0,0 +1,35 @@ +#! /bin/bash +######################################################################## +# +# Copyright (c) 2018 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +######################################################################## + +# Loads Up Utilities and Commands Variables + +source /usr/local/sbin/collect_parms +source /usr/local/sbin/collect_utils + +SERVICE="ovs" +LOGFILE="${extradir}/${SERVICE}.info" + + +############################################################################### +# Only Compute Nodes +############################################################################### +if [[ "$nodetype" == "compute" || "$subfunction" == *"compute"* ]] ; then + + if [[ "$vswitch_type" == *ovs* ]]; then + echo "${hostname}: OVS Info ..........: ${LOGFILE}" + + delimiter ${LOGFILE} "ovsdb-client dump" + ovsdb-client dump >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} + + delimiter ${LOGFILE} "ovs-vsctl show" + ovs-vsctl --timeout 10 show >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} + fi +fi + +exit 0 diff --git a/tools/collector/scripts/collect_vswitch.sh b/tools/collector/scripts/collect_vswitch.sh deleted file mode 100644 index e9bd2b884..000000000 --- a/tools/collector/scripts/collect_vswitch.sh +++ /dev/null @@ -1,108 +0,0 @@ -#! /bin/bash -# -# Copyright (c) 2013-2014 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - - -# Loads Up Utilities and Commands Variables - -source /usr/local/sbin/collect_parms -source /usr/local/sbin/collect_utils - -SERVICE="vswitch" -LOGFILE="${extradir}/${SERVICE}.info" - -LIST_COMMANDS=( - # keep items sorted alphabetically - "address-list" - "dvr-mac-list" - "dvr-subnet-list" - "engine-list" - "engine-queue-list" - "filter-bindings-list" - "filter-rule-list" - "flow-group-list" - "flow-rule-list" - "igmp-group-list" - "igmp-interface-list" - "interface-list" - "lacp-interface-list" - "lacp-neighbour-list" - "lldp-agent-list" - "lldp-neighbour-list" - "mld-group-list" - "mld-interface-list" - "nat-list" - "neighbour-list" - "network-list" - "network-table-list" - "openflow-controller-list" - "openflow-errors-list" - "ovsdb-manager-list" - "ovsdb-monitor-list" - "port-list" - "route-list" - "router-list" - "router-list" - "snat-list" - "stream-list" - "vxlan-endpoint-list" - "vxlan-ip-endpoint-list" - "vxlan-peer-list") - -STATS_COMMANDS=( - # keep below items sorted alphabetically - "arp-stats-list" - "dvr-stats-list" - "engine-stats-list" - "filter-stats-list" - "flow-cache-stats-list" - "flow-event-stats-list" - "flow-switch-stats-list" - "flow-table-stats-list" - "icmp-stats-list" - "igmp-stats-list" - "interface-stats-list" - "ip-stats-list" - "ip-stats-list-errors" - "lacp-stats-list" - "lldp-stats-list" - "memory-stats-list" - "mld-stats-list" - "nat-stats-list" - "ndp-stats-list" - "network-stats-list" - "openflow-stats-list" - "port-queue-stats-list" - "port-rate-list" - "port-stats-list" - "snat-stats-list" - "udp-stats-list" - "vxlan-endpoint-stats-list") - -############################################################################### -# Only Compute Nodes -############################################################################### -if [[ "$nodetype" == "compute" || "$subfunction" == *"compute"* ]] ; then - - echo "${hostname}: AVS Info ..........: ${LOGFILE}" - - for COMMAND in ${LIST_COMMANDS[@]}; do - delimiter ${LOGFILE} "vshell ${COMMAND}" - vshell ${COMMAND} --expanded >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} - done - - for COMMAND in ${STATS_COMMANDS[@]}; do - delimiter ${LOGFILE} "vshell ${COMMAND}" - vshell ${COMMAND} >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} - done - - if [[ "$sdn_enabled" == "yes" ]] ; then - delimiter ${LOGFILE} "ovsdb-client dump" - ovsdb-client dump >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} - fi -fi - -exit 0