summaryrefslogtreecommitdiffstats
path: root/jjb/scripts/setup_executor_env.sh
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-04-23 13:12:24 +0000
committerDave Wallace <dwallacelf@gmail.com>2021-06-03 14:27:54 -0400
commit08c4bd59672f308b3a871e063e103909040df394 (patch)
tree44551c7f6bc3a71d5d7e7fc2855fc863ccdb621d /jjb/scripts/setup_executor_env.sh
parent90da6a2780f9a9e73321b5784b3d5eb3928bca31 (diff)
JJB: Include perf analysis per job
+ Useful for performance analysis before run. This should help to analyze machine load before starting payload by comparing conditions from running jobs. - Requirements: sysstat (apt install sysstat) - Remove extraneous python import from backup_upload_archives.sh - Fix sar issue on centos-7 - Fix debian9 lftools install / upgrade issue Signed-off-by: pmikus <pmikus@cisco.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I6b61f99b9b2cde2bac3dacdefaa926e9afbb157e
Diffstat (limited to 'jjb/scripts/setup_executor_env.sh')
-rwxr-xr-xjjb/scripts/setup_executor_env.sh30
1 files changed, 30 insertions, 0 deletions
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