summaryrefslogtreecommitdiff
path: root/Microbenchmarks/CPU-DPU/run-transfer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Microbenchmarks/CPU-DPU/run-transfer.sh')
-rwxr-xr-xMicrobenchmarks/CPU-DPU/run-transfer.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/Microbenchmarks/CPU-DPU/run-transfer.sh b/Microbenchmarks/CPU-DPU/run-transfer.sh
index f835f0c..e247105 100755
--- a/Microbenchmarks/CPU-DPU/run-transfer.sh
+++ b/Microbenchmarks/CPU-DPU/run-transfer.sh
@@ -2,7 +2,12 @@
NCORES=$(grep -c '^processor' /proc/cpuinfo)
-trap "pkill -f 'stress -c ${NCORES}'" INT
+cleanexit() {
+ pkill -f "stress -c ${NCORES}"
+ pkill -f mpstat
+}
+
+trap cleanexit TERM INT
set -e