another directory rename: failstar -> fail
"failstar" sounds like a name for a cruise liner from the 80s. As "*" isn't a desirable part of directory names, just name the whole thing "fail/", the core parts being stored in "fail/core/". Additionally fixing two build system dependency issues: - missing jobserver -> protomessages dependency - broken bochs -> fail dependency (add_custom_target DEPENDS only allows plain file dependencies ... cmake for the win) git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@956 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
59
scripts/multiple-clients.sh
Executable file
59
scripts/multiple-clients.sh
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# multiple-clients.sh [num_clients]
|
||||
# Starts multiple client.sh instances in a new tmux session. The number of
|
||||
# clients defaults to #CPUs+1.
|
||||
#
|
||||
# Prerequisites:
|
||||
# - client.sh and all necessary FailBochs ingredients (bochs binary, bochsrc,
|
||||
# BIOS/VGA-BIOS, boot image, possibly a saved state) in the current
|
||||
# directory
|
||||
# - tmux installed somewhere in $PATH
|
||||
# - possibly missing dynamic libraries in ~/bochslibs (e.g., for running a
|
||||
# i386 bochs binary in an x86_64 environment)
|
||||
#
|
||||
|
||||
set -e
|
||||
LIBDIR=~/bochslibs
|
||||
|
||||
# cleanup earlier failures
|
||||
# (FIXME: you probably don't want this on your local machine!)
|
||||
killall -q bochs || true
|
||||
|
||||
# On many machines, ~ is mounted via NFS. To avoid the (severe) performance
|
||||
# penalty, copy all experiment-related stuff to /tmp.
|
||||
TMP=/tmp/fail.$(id -nu)
|
||||
mkdir -p $TMP
|
||||
rsync -a --delete * $TMP/
|
||||
if [ -d $LIBDIR ]
|
||||
then
|
||||
rsync -a --delete $LIBDIR $TMP/
|
||||
fi
|
||||
cd $TMP
|
||||
|
||||
# tmux, please shut up.
|
||||
TMUX='tmux -q'
|
||||
COMMAND=./client.sh
|
||||
SESSION=failbochs.$$
|
||||
|
||||
# Calculate number of clients from #processors.
|
||||
PROCESSORS=$(fgrep processor /proc/cpuinfo|wc -l)
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
NWIN=$(($PROCESSORS+1))
|
||||
#NWIN=$(($NWIN*2))
|
||||
else
|
||||
NWIN=$1
|
||||
fi
|
||||
|
||||
# Run $NWIN clients in a new tmux session.
|
||||
$TMUX new-session -s $SESSION -d "$COMMAND"
|
||||
for i in $(seq 1 $(($NWIN-1)))
|
||||
do
|
||||
$TMUX new-session -t $SESSION -d \; split-window -h "$COMMAND"
|
||||
$TMUX new-session -t $SESSION -d \; select-layout tiled
|
||||
done
|
||||
|
||||
# Some diagnostics for the operator.
|
||||
echo "$(uname -n) ($PROCESSORS CPUs @ $(fgrep MHz /proc/cpuinfo|head -n1|awk '{print $(NF)}') MHz): started $NWIN clients"
|
||||
#$TMUX attach -t $SESSION
|
||||
Reference in New Issue
Block a user