Commit 3d834218 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

autotest: Monitor system resources during functional tests



This is done in order to have a better picture on how target system
behaves during our tests. Hardware-specific tooling will be executed
only under phy nodes, but more generic data will be available for
VMs as well.

Gathered data will include the following:

 - CPU load (VMs and PHY)
 - vmstat (VMs and PHY)
 - Power Management data (PHY only)
 - Thermal data (PHY only)

Note that Power Management and Thermal data may not be available for
all the PHY nodes we have in the CI pool since it solely depends
on specific features provided by BMCs and CPUs (which may not be
supported) but the majority should provide similar data.

Change-Id: Ifa904b4a76b7b2597bee6d44989573c1ed9e06c1
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21174


Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 55013c9e
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -47,6 +47,20 @@ if [ $(uname -s) = Linux ]; then
		"$udevadm" monitor --property &> "$output_dir/udev.log" &
		udevadm_pid=$!
	fi

	mkdir -p "$output_dir/power"

	"$rootdir/scripts/perf/pm/collect-cpu-load" -d "$output_dir/power" > /dev/null &
	echo $! > "$output_dir/collect-cpu-load.pid"
	"$rootdir/scripts/perf/pm/collect-vmstat" -d "$output_dir/power" > /dev/null &
	echo $! > "$output_dir/collect-vmstat.pid"

	if [[ $(< /sys/class/dmi/id/chassis_vendor) != QEMU ]]; then
		"$rootdir/scripts/perf/pm/collect-cpu-temp" -d "$output_dir/power" -l &
		echo $! > "$output_dir/collect-cpu-temp.pid"
		"$rootdir/scripts/perf/pm/collect-bmc-pm" -d "$output_dir/power" -l &
		echo $! > "$output_dir/collect-bmc-pm.pid"
	fi
fi

trap "autotest_cleanup || :; exit 1" SIGINT SIGTERM EXIT
+8 −0
Original line number Diff line number Diff line
@@ -1416,6 +1416,14 @@ function autotest_cleanup() {

		fi > "$output_dir/proc_list.txt" 2>&1 || :
	fi

	local pid
	for pid in "$output_dir/"*.pid; do
		killprocess "$(< "$pid")"
	done || :

	rm -f "$output_dir/"*.pid

	xtrace_restore
	return $autotest_es
}