1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/bash mkdir -p $(hostname) NCORES=$(grep -c '^processor' /proc/cpuinfo) cleanexit() { pkill -f "stress -c ${NCORES}" } trap cleanexit TERM INT stress -c ${NCORES} & ./run-rank.sh | tee "$(hostname)/rank-stress-c${NCORES}.txt" cleanexit