Megatest

Check-in [21daa4826c]
Login
Overview
Comment:Increased the delay in loadrunner to hopefully minimize overshoot
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.55
Files: files | file ages | folders
SHA1: 21daa4826c22b0b130c9d2b145b7ed358af82f02
User & Date: matt on 2014-06-18 00:19:36
Other Links: branch diff | manifest | tags
Context
2014-06-18
10:47
Increase lock times check-in: 40449256f8 user: mrwellan tags: v1.55, v1.5521
00:19
Increased the delay in loadrunner to hopefully minimize overshoot check-in: 21daa4826c user: matt tags: v1.55
2014-06-17
22:54
Improved loadrunner check-in: 5ded10a6e8 user: mrwellan tags: v1.55
Changes

Modified utils/loadrunner from [b02c49d790] to [b3aa7cab0e].

25
26
27
28
29
30
31
32
33
34
35



36
37
38
39
40
41
42
43
44
45
46
  max_load=$MAX_ALLOWED_LOAD
fi

lfile=/tmp/loadrunner-$USER.lockfile
lockfile -r 2 -l 20 $lfile

if [[  $lperc -lt $max_load ]];then
  if [[ $lperc -ge $lperc2 ]];then
    echo "Load acceptable: lperc=$lperc %, max_load=$max_load %, load=$load, numcpu=$numcpu, MAX_ALLOWED_LOAD=$MAX_ALLOWED_LOAD % and $lperc2 < $lperc"
    echo "Starting command: \"$@\""
    nbfake "$@"



  else
   rm -f $lfile
    echo "$LOADRUNNER $@" | at now + 2 minutes 2> /dev/null
  fi
else
  # echo "Load too high: lperc=$lperc, max_load=$max_load, waiting two minutes before trying to run command: \"$@\""
  echo "$LOADRUNNER $@" | at now + 2 minutes 2> /dev/null
fi

sleep 1
rm -f $lfile







|



>
>
>


|






|

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  max_load=$MAX_ALLOWED_LOAD
fi

lfile=/tmp/loadrunner-$USER.lockfile
lockfile -r 2 -l 20 $lfile

if [[  $lperc -lt $max_load ]];then
  if [[ $lperc -le $lperc2 ]];then
    echo "Load acceptable: lperc=$lperc %, max_load=$max_load %, load=$load, numcpu=$numcpu, MAX_ALLOWED_LOAD=$MAX_ALLOWED_LOAD % and $lperc2 < $lperc"
    echo "Starting command: \"$@\""
    nbfake "$@"
    # we sleep ten seconds here to keep the lock and give time for
    # the uptime to show a response
    sleep 10
  else
   rm -f $lfile
   echo "$LOADRUNNER $@" | at now + 2 minutes 2> /dev/null
  fi
else
  # echo "Load too high: lperc=$lperc, max_load=$max_load, waiting two minutes before trying to run command: \"$@\""
  echo "$LOADRUNNER $@" | at now + 2 minutes 2> /dev/null
fi

sleep 4
rm -f $lfile