mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-10 01:12:18 +08:00
Allow string interpol in collect sleep calc so --sleep-collect works.
This commit is contained in:
@@ -891,7 +891,7 @@ collect() {
|
|||||||
"$OPT_DISK_PCT_FREE" \
|
"$OPT_DISK_PCT_FREE" \
|
||||||
|| break
|
|| break
|
||||||
|
|
||||||
sleep $(date +%s.%N | awk '{print $OPT_SLEEP_COLLECT - ($1 % $OPT_SLEEP_COLLECT)}')
|
sleep $(date +'%s.%N' | awk "{print $OPT_SLEEP_COLLECT - (\$1 % $OPT_SLEEP_COLLECT)}")
|
||||||
local ts="$(date +"TS %s.%N %F %T")"
|
local ts="$(date +"TS %s.%N %F %T")"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ collect() {
|
|||||||
|| break
|
|| break
|
||||||
|
|
||||||
# Synchronize ourselves onto the clock tick, so the sleeps are 1-second
|
# Synchronize ourselves onto the clock tick, so the sleeps are 1-second
|
||||||
sleep $(date +%s.%N | awk '{print $OPT_SLEEP_COLLECT - ($1 % $OPT_SLEEP_COLLECT)}')
|
sleep $(date +'%s.%N' | awk "{print $OPT_SLEEP_COLLECT - (\$1 % $OPT_SLEEP_COLLECT)}")
|
||||||
local ts="$(date +"TS %s.%N %F %T")"
|
local ts="$(date +"TS %s.%N %F %T")"
|
||||||
|
|
||||||
# #####################################################################
|
# #####################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user