diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 17:01:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 17:01:24 +0000 |
commit | 6dd3dfb79125cd02d02efbce435a6c82e5af92ef (patch) | |
tree | 45084fc83278586f6bbafcb935f92d53f71a6b03 /test/ploadstart.sh | |
parent | Initial commit. (diff) | |
download | corosync-6dd3dfb79125cd02d02efbce435a6c82e5af92ef.tar.xz corosync-6dd3dfb79125cd02d02efbce435a6c82e5af92ef.zip |
Adding upstream version 3.1.8.upstream/3.1.8upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/ploadstart.sh')
-rw-r--r-- | test/ploadstart.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/ploadstart.sh b/test/ploadstart.sh new file mode 100644 index 0000000..bea065b --- /dev/null +++ b/test/ploadstart.sh @@ -0,0 +1,60 @@ +#!@BASHPATH@ + +set -e + +msg_count="" +msg_size="" + +usage() { + echo "ploadstart [options]" + echo "" + echo "Options:" + echo " -c msg_count Number of messages to send (max UINT32_T default 1500000)" + echo " -s msg_size Size of messages in bytes (max 1000000 default 300)" + echo " -h display this help" +} + +while getopts "hs:c:" optflag; do + case "$optflag" in + h) + usage + exit 0 + ;; + c) + msg_count="$OPTARG" + ;; + s) + msg_size="$OPTARG" + ;; + \?|:) + usage + exit 1 + ;; + esac +done + +[ -n "$msg_count" ] && corosync-cmapctl -s pload.count u32 $msg_count +[ -n "$msg_size" ] && corosync-cmapctl -s pload.size u32 $msg_size + +echo "***** WARNING *****" +echo "" +echo "Running pload test will kill your cluster and all corosync daemons will exit" +echo "at the end of the load test" +echo "" +echo "***** END OF WARNING *****" +echo "" +echo "YOU HAVE BEEN WARNED" +echo "" +echo "If you agree, and want to proceed, please type:" +echo "Yes, I fully understand the risks of what I am doing" +echo "" +read -p "type here: " ans + +[ "$ans" = "Yes, I fully understand the risks of what I am doing" ] || { + echo "Wise choice.. or you simply didn't type it right" + exit 0 +} + +corosync-cmapctl -s pload.start str i_totally_understand_pload_will_crash_my_cluster_and_kill_corosync_on_exit + +echo "PLOAD started, please see corosync.log for final results" |