You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
718 B

  1. #!/bin/bash
  2. # stop-virl-topology-benchmark.sh
  3. # HS-Fulda - sebastian.rieger@informatik.hs-fulda.de
  4. #
  5. # changelog:
  6. # V1.0 initial version
  7. # usage
  8. if [ ! $# -eq 2 ] ; then
  9. echo -e "usage: $0 <username> <password>, e.g.,\n"
  10. echo "$0 guest password"
  11. exit -1
  12. fi
  13. USERNAME=$1
  14. PASSWORD=$2
  15. # get all running benchmark simulations
  16. RUNNING_BENCHMARKS=$(virl_std_client --username $USERNAME --password $PASSWORD --quiet --json \
  17. simengine-list | egrep -o -e "VIRLBENCH(.*)@(.*)-[_a-zA-Z0-9]{6}")
  18. # stop each benchmark simulation
  19. for BENCHMARK in $RUNNING_BENCHMARKS; do
  20. echo "Stopping $BENCHMARK"
  21. virl_std_client --username $USERNAME --password $PASSWORD --quiet \
  22. simengine-stop --session-id $BENCHMARK
  23. done