summaryrefslogtreecommitdiffstats
path: root/ci/envs/stress_daily.sh
diff options
context:
space:
mode:
authorShravani <shravani.p@tcs.com>2016-12-07 21:18:16 -0800
committerShravani <shravani.p@tcs.com>2016-12-07 22:10:36 -0800
commit9bdeee16856c2d934ef331e8b1c118146e0ec714 (patch)
tree85203fdf0f24df0ec1b2073603f1c7f112f2ea8e /ci/envs/stress_daily.sh
parentec568fdb37d280371733cab5e9fad030557f6921 (diff)
This patch contains scripts for applying stress on host or guest at
run time based on the stress type(cpu/memory/io). Change-Id: I845b3ec028f375cf0809fb3a184b1511787d263b Signed-off-by: Shravani <shravani.p@tcs.com>
Diffstat (limited to 'ci/envs/stress_daily.sh')
-rwxr-xr-xci/envs/stress_daily.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/ci/envs/stress_daily.sh b/ci/envs/stress_daily.sh
new file mode 100755
index 000000000..a07c8076a
--- /dev/null
+++ b/ci/envs/stress_daily.sh
@@ -0,0 +1,26 @@
+##########################################################################
+#This script will pass arguments to stress script based on the stress type
+##########################################################################
+#!/bin/bash
+source host-config
+
+stress_type=$1
+timeout=10m
+
+case $stress_type in
+ cpu) # processor
+ ARGS="--cpu=100"
+ ;;
+ memory)
+ ARGS="--vm=100"
+ ;;
+ io)
+ ARGS="--io 10 --hdd 100"
+ ;;
+ *)
+ echo $"Usage: $0 {cpu|memory|io}"
+ exit 1
+esac
+
+#stress_isolcpus will hold range as a value i.e, eg :24-43
+sh stress_scripts.sh -c ${stress_isolcpus} -t $timeout -a $ARGS