![Scott Little](/assets/img/avatar_default.png)
Move content from stx-utils into stx-integ or stx-update Packages will be relocated to stx-update: enable-dev-patch extras stx-integ: config-files/ io-scheduler filesystem/ filesystem-scripts grub/ grubby logging/ logmgmt tools/ collector monitor-tools tools/engtools/ hostdata-collectors parsers utilities/ build-info branding (formerly wrs-branding) platform-util Change-Id: I5613b2a2240f723295fbbd2783786922ef5d0f8b Story: 2002801 Task: 22687 Signed-off-by: Scott Little <scott.little@windriver.com>
53 lines
1.5 KiB
Bash
Executable File
53 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
#Copyright (c) 2016 Wind River Systems, Inc.
|
|
#
|
|
#SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
# This script is used to parse stats data for controller/CPE hosts. For large office,
|
|
# it is called by parse-everything.sh. For CPE, it should be called on its own.
|
|
# File lab.conf must exist with CONTROLLER_LIST config parameter set for the script to run
|
|
# Usage: ./parse-controllers.sh
|
|
|
|
PARSERDIR=$(dirname $0)
|
|
. ${PARSERDIR}/parse-util.sh
|
|
|
|
if [ ! -f lab.conf ]; then
|
|
echo "Lab configuration file is missing."
|
|
echo "See http://wiki.wrs.com/PBUeng/TitaniumServerSysengToolsAndDataAnalysis for more info."
|
|
exit 1
|
|
fi
|
|
|
|
source ./lab.conf
|
|
|
|
if [ -z "${CONTROLLER_LIST}" ]; then
|
|
echo "ERROR: Controller list is not set in lab.conf file. Exiting..."
|
|
exit 1
|
|
fi
|
|
|
|
for HOST in ${CONTROLLER_LIST}; do
|
|
LOG "Parsing stats data for controller host ${HOST}"
|
|
if [ -d ${HOST} ]; then
|
|
cd ${HOST}
|
|
bzip2 ${HOST}* > /dev/null 2>&1
|
|
../parse-all.sh ${HOST} > /dev/null 2>&1 &
|
|
# Delay the next controller because they both write to /tmp
|
|
sleep 120
|
|
cd ..
|
|
else
|
|
ERRLOG "${HOST} does not exist. Parsing skipped."
|
|
fi
|
|
done
|
|
|
|
# Parsing postgres connection stats is a time consuming step, run it in parallel with parse-all
|
|
# script.
|
|
for HOST in ${CONTROLLER_LIST}; do
|
|
if [ -d ${HOST} ]; then
|
|
LOG "Parsing postgres connection stats data for controller host ${HOST}"
|
|
cd ${HOST}
|
|
../parse-postgres.sh *postgres.bz2 > /dev/null 2>&1 &
|
|
cd ..
|
|
fi
|
|
done
|