summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2021-06-03 19:52:57 +0000
committerGerrit Code Review <gerrit@fd.io>2021-06-03 19:52:57 +0000
commitbee2070d4a089ed9badba8d2ecd95a7ea82d3085 (patch)
tree889d3f1ab65b1cf9799a3353eb5ad4733498ac7f
parentdfc3471ba2fc8c0f68668b18d8968959c4a8c46d (diff)
parent08c4bd59672f308b3a871e063e103909040df394 (diff)
Merge "JJB: Include perf analysis per job"
-rwxr-xr-xdocker/scripts/dbld_lfit_requirements.sh5
-rw-r--r--docker/scripts/lib_apt.sh1
-rw-r--r--docker/scripts/lib_dnf.sh1
-rw-r--r--docker/scripts/lib_yum.sh1
-rwxr-xr-xjjb/scripts/backup_upload_archives.sh1
-rwxr-xr-xjjb/scripts/post_build_executor_info.sh11
-rwxr-xr-xjjb/scripts/setup_executor_env.sh30
7 files changed, 49 insertions, 1 deletions
diff --git a/docker/scripts/dbld_lfit_requirements.sh b/docker/scripts/dbld_lfit_requirements.sh
index 7067d992..278b78ed 100755
--- a/docker/scripts/dbld_lfit_requirements.sh
+++ b/docker/scripts/dbld_lfit_requirements.sh
@@ -54,5 +54,10 @@ OLD_PATH="$PATH"
python3 -m venv "$LF_VENV"
PATH="$LF_VENV/bin:$PATH"
python3 -m pip install --upgrade pip
+# on Debian-9 lftools needs to be installed before it is upgraded
+# in order to get the latest version.
+if [ "$OS_ID" = "debian" ] && [ "$OS_VERSION_ID" = "9" ] ; then
+ python3 -m pip install lftools
+fi
python3 -m pip install --upgrade --upgrade-strategy eager lftools
PATH="$OLD_PATH"
diff --git a/docker/scripts/lib_apt.sh b/docker/scripts/lib_apt.sh
index 725aedcc..099a85a6 100644
--- a/docker/scripts/lib_apt.sh
+++ b/docker/scripts/lib_apt.sh
@@ -178,6 +178,7 @@ RUN apt-get update -qq \\
ruby-dev \\
software-properties-common \\
sshpass \\
+ sysstat \\
sudo \\
texlive-fonts-extra \\
texlive-fonts-recommended \\
diff --git a/docker/scripts/lib_dnf.sh b/docker/scripts/lib_dnf.sh
index 45204210..c6062169 100644
--- a/docker/scripts/lib_dnf.sh
+++ b/docker/scripts/lib_dnf.sh
@@ -126,6 +126,7 @@ RUN dnf install -y \\
rsync \\
ruby-devel \\
sshpass \\
+ sysstat \\
sudo \\
tree \\
unzip \\
diff --git a/docker/scripts/lib_yum.sh b/docker/scripts/lib_yum.sh
index 27c297a1..fe0bc535 100644
--- a/docker/scripts/lib_yum.sh
+++ b/docker/scripts/lib_yum.sh
@@ -120,6 +120,7 @@ RUN yum install -y \\
rake \\
ruby-devel \\
sshpass \\
+ sysstat \\
sudo \\
tree \\
unzip \\
diff --git a/jjb/scripts/backup_upload_archives.sh b/jjb/scripts/backup_upload_archives.sh
index b4967491..b660f868 100755
--- a/jjb/scripts/backup_upload_archives.sh
+++ b/jjb/scripts/backup_upload_archives.sh
@@ -35,7 +35,6 @@ cat >$PYTHON_SCRIPT <<'END_OF_PYTHON_SCRIPT'
import argparse
import gzip
import os
-import requests
from mimetypes import MimeTypes
from boto3 import resource
diff --git a/jjb/scripts/post_build_executor_info.sh b/jjb/scripts/post_build_executor_info.sh
index f9866667..fef79814 100755
--- a/jjb/scripts/post_build_executor_info.sh
+++ b/jjb/scripts/post_build_executor_info.sh
@@ -45,3 +45,14 @@ if [ -n "$(which ccache)" ] ; then
fi
echo "$long_line"
+
+# Avoid sar anomaly on centos-7 in global-jjb/shell/logs-deploy.sh
+#
+# Note: VPP 20.09 will be removed in the next release cycle (21.10),
+# therefore this hack is better than polluting the docker image
+# build scripts with code to avoid installing sysstat on centos-7.
+#
+# TODO: Remove when vpp-*-2009-centos7-x86_64 jobs are removed
+if [ "$OS_ID" = "centos" ] && [ "$OS_VERSION_ID" = "7" ] ; then
+ sudo yum remove -y sysstat >& /dev/null || true
+fi
diff --git a/jjb/scripts/setup_executor_env.sh b/jjb/scripts/setup_executor_env.sh
index a6b8216d..4d3cb6ec 100755
--- a/jjb/scripts/setup_executor_env.sh
+++ b/jjb/scripts/setup_executor_env.sh
@@ -25,6 +25,7 @@ file_delimiter="----- %< -----"
long_line="************************************************************************"
downloads_cache="/root/Downloads"
+# Node info
echo "$long_line"
echo "Executor Runtime Attributes:"
echo "OS: $OS_ID-$OS_VERSION_ID"
@@ -41,6 +42,35 @@ else
echo "Unknown Executor: '$dockerfile' not found!"
fi
+# Performance analysis
+perf_trials=2
+perf_interval=1
+if [ "$OS_ID" == "ubuntu" ] || [ "$OS_ID" = "debian" ] ; then
+ SYSSTAT_PATH="/var/log/sysstat"
+elif [ "$OS_ID" == "centos" ] ; then
+ if [ "$OS_VERSION_ID" = "7" ] ; then
+ SYSSTAT_PATH="/var/log/sa/sa02"
+ else
+ SYSSTAT_PATH="/var/log/sa"
+ fi
+fi
+echo "$long_line"
+echo "Virtual memory stat"
+vmstat ${perf_interval} ${perf_trials}
+echo "CPU time breakdowns per CPU"
+mpstat -P ALL ${perf_interval} ${perf_trials}
+echo "Per-process summary"
+pidstat ${perf_interval} ${perf_trials}
+echo "Block device stats"
+iostat -xz ${perf_interval} ${perf_trials}
+echo "Memory utilization"
+free -m
+echo "Network interface throughput"
+sar -n DEV -o ${SYSSTAT_PATH} ${perf_interval} ${perf_trials}
+echo "TCP metrics"
+sar -n TCP,ETCP -o ${SYSSTAT_PATH} ${perf_interval} ${perf_trials}
+
+# SW stack
echo "$long_line"
echo "Executor package list:"
if [ "$OS_ID" == "ubuntu" ] || [ "$OS_ID" = "debian" ] ; then