mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-22 03:00:29 +08:00
Increase Bash wait_for_files from 3 to 30s. Wait for innodbstatus2 in collec.t.
This commit is contained in:
@@ -23,7 +23,7 @@ p="$PT_TMPDIR/collect/2011_12_05"
|
|||||||
# Default collect, no extras like gdb, tcpdump, etc.
|
# Default collect, no extras like gdb, tcpdump, etc.
|
||||||
collect "$PT_TMPDIR/collect" "2011_12_05" > $p-output 2>&1
|
collect "$PT_TMPDIR/collect" "2011_12_05" > $p-output 2>&1
|
||||||
|
|
||||||
wait_for_files "$p-hostname" "$p-opentables2" "$p-variables" "$p-df"
|
wait_for_files "$p-hostname" "$p-opentables2" "$p-variables" "$p-df" "$p-innodbstatus2"
|
||||||
|
|
||||||
# Even if this system doesn't have all the cmds, collect should still
|
# Even if this system doesn't have all the cmds, collect should still
|
||||||
# have created some files for cmds that (hopefully) all systems have.
|
# have created some files for cmds that (hopefully) all systems have.
|
||||||
|
|||||||
@@ -204,9 +204,9 @@ wait_for_files() {
|
|||||||
for file in "$@"; do
|
for file in "$@"; do
|
||||||
local slept=0
|
local slept=0
|
||||||
while ! [ -f $file ]; do
|
while ! [ -f $file ]; do
|
||||||
sleep 0.1;
|
sleep 0.2;
|
||||||
slept=$((slept + 1))
|
slept=$((slept + 1))
|
||||||
[ $slept -ge 50 ] && break # 5s
|
[ $slept -ge 150 ] && break # 30s
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user