[Gates] Synchronize script instance_test.sh
Script rally-jobs/extra/instance_test.sh is synchronized with samples/tasks/support/instance_test.sh which has some improvements. Change-Id: I8deaaefa4c68e3ff9835d4dab034e5aaeea13630
This commit is contained in:
parent
c0ad17725b
commit
d54508de87
@ -2,6 +2,15 @@
|
|||||||
# Load server and output JSON results ready to be processed
|
# Load server and output JSON results ready to be processed
|
||||||
# by Rally scenario
|
# by Rally scenario
|
||||||
|
|
||||||
|
for ex in awk top grep free tr df dc dd gzip
|
||||||
|
do
|
||||||
|
if ! type ${ex} >/dev/null
|
||||||
|
then
|
||||||
|
echo "Executable is required by script but not available on a server: ${ex}" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
get_used_cpu_percent() {
|
get_used_cpu_percent() {
|
||||||
echo 100 $(top -b -n 1 | grep -i CPU | head -n 1 | awk '{print $8}' | tr -d %) - p | dc
|
echo 100 $(top -b -n 1 | grep -i CPU | head -n 1 | awk '{print $8}' | tr -d %) - p | dc
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user