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"
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
long_line="************************************************************************"
downloads_cache="/root/Downloads"
+# Node info
echo "$long_line"
echo "Executor Runtime Attributes:"
echo "OS: $OS_ID-$OS_VERSION_ID"
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