234.1.9
by Roel Van de Paar
Adding keep_single_trial.sh script |
1 |
#!/bin/bash
|
2 |
# Created by Roel Van de Paar, Percona LLC
|
|
3 |
||
4 |
if [ "" == "$1" ]; then |
|
5 |
echo "This script keeps a given trial (from a combinations.pl run) completely (i.e. all files included) in the KEEP directory" |
|
6 |
echo "within a given combinations.pl workdir. Execute this script directly from within the combinations.pl workdir." |
|
7 |
echo "Example: to keep trial 1000, execute as: ./keep_single_trial.sh 1000" |
|
8 |
exit 1 |
|
9 |
elif [ ! -r "trial$1.log" ]; then |
|
10 |
echo "This script keeps a given trial (from a combinations.pl run) completely (i.e. all files included) in the KEEP directory" |
|
11 |
echo "within a given combinations.pl workdir. Execute this script directly from within the combinations.pl workdir." |
|
12 |
echo "Error: trial number '$1' was passed as an option to this script. However, no trial$1.log exists! Please check and retry." |
|
13 |
exit 1 |
|
14 |
else
|
|
15 |
TRIAL=$1 |
|
16 |
fi
|
|
17 |
||
18 |
# Attempt making KEEP directory (or; it may already exist)
|
|
19 |
mkdir KEEP > /dev/null 2>&1 |
|
20 |
if [ ! -d KEEP ]; then |
|
21 |
echo "Error: there is no KEEP subdirectory here, even after we attempted creating one" |
|
22 |
exit 1 |
|
23 |
fi
|
|
24 |
||
25 |
mv trial$TRIAL.log KEEP # Must succeed (it was present in check above), or report failure (i.e. no redirect to /dev/null) |
|
26 |
mv vardir1_$TRIAL.tar.gz KEEP > /dev/null 2>&1 |
|
27 |
mv vardir1_$TRIAL KEEP > /dev/null 2>&1 |
|
340.1.2
by Roel Van de Paar
Adding binmode (--binary-mode) for correct parsing of non-ASCII chars in replay sql files |
28 |
mv cl$TRIAL cl_binmode$TRIAL cl_mtr$TRIAL cl_binmode_mtr$TRIAL KEEP > /dev/null 2>&1 |
29 |
mv cmd$TRIAL cmdtrace$TRIAL start$TRIAL start_mtr$TRIAL init$TRIAL start_wipe_mtr$TRIAL KEEP > /dev/null 2>&1 |
|
338.1.7
by Roel Van de Paar
Various script improvements |
30 |
mv $TRIAL.sql KEEP > /dev/null 2>&1 |
305.1.6
by Roel Van de Paar
Large inprovements to startup.sh: now handles _epoch and crashes during bootstap correctly |
31 |
mv rundir1_$TRIAL KEEP > /dev/null 2>&1 |
32 |
mv run$TRIAL.log_* $TRIAL[a-zA-Z]*.sql* KEEP > /dev/null 2>&1 |
|
33 |
mv run$TRIAL.log stop$TRIAL stop_mtr$TRIAL test$TRIAL test_mtr$TRIAL wipe$TRIAL $TRIAL.out KEEP > /dev/null 2>&1 |
|
234.1.10
by Roel Van de Paar
Two minor bug fixes for single trial handling scripts |
34 |
mv dump$TRIAL dump_mtr$TRIAL gdb_${TRIAL}_*.txt master_${TRIAL}_*.err KEEP > /dev/null 2>&1 |
234.1.9
by Roel Van de Paar
Adding keep_single_trial.sh script |
35 |
|
36 |
echo "- Trial #$TRIAL and all related files moved to ./KEEP" |