add rt and thread/process checks in log
authorLaurent MAZET <laurent.mazet@thalesgroup.com>
Tue, 4 Nov 2025 17:14:24 +0000 (18:14 +0100)
committerLaurent MAZET <laurent.mazet@thalesgroup.com>
Tue, 4 Nov 2025 17:14:24 +0000 (18:14 +0100)
test.sh

diff --git a/test.sh b/test.sh
index 94fcb502ede353f295b14d20000248802cabf45b..aa6486990560e7dceefb5eb9ab4e17fa493d2c22 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -3,6 +3,16 @@
 nbcpu=$(grep -c processor /proc/cpuinfo)
 nbtests=20000
 
+check() {
+  test=$1
+
+  for p in $(ps aux|awk "/$test/ && ! /sudo/ {print \$2}"); do
+    echo "pid $p"
+    taskset -ap $p
+    chrt -ap $p
+  done | sort
+}
+
 run() {
   dcore=$1
   lcpu=$2
@@ -18,6 +28,7 @@ run() {
     echo "CPU load: $load% ($lcpu/$nbcpu)" | tee -a $name.log
     { ./$exe -d 1 -k $dcore -m $mode -n $nbtests -s -o $name.dat | tee -a $name.log; \
       kill -2 $(ps -e | awk '/[l]oad/ || /[s]leep/ { print $1 }') 2>/dev/null; } &
+    { sleep 2; check $exe | tee -a $name.log; } &
     ./load -r -1 -n $lcpu >/dev/null
     echo "Cleaning..."
     date | tee -a $name.log