diff options
author | John Kacur <jkacur@redhat.com> | 2019-05-07 15:26:38 +0200 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2019-05-07 16:08:34 +0200 |
commit | 59c7b5e334940fff29ea49aa722d1c43c88a436b (patch) | |
tree | 124f27f098e420186a06f79b10c5422d17edc299 | |
parent | 138eca451eb7206ebe68177096ee2dfe7802b943 (diff) | |
download | rt-tests-59c7b5e334940fff29ea49aa722d1c43c88a436b.tar.gz rt-tests-59c7b5e334940fff29ea49aa722d1c43c88a436b.tar.xz |
queuelat: Assume queuelat and queuelat scripts are in the path
Assume queuelat and queuelat scripts are in the path. Don't hardcode
their location.
Write the temporary data to /usr/tmp/outfile
Signed-off-by: John Kacur <jkacur@redhat.com>
-rwxr-xr-x | src/queuelat/determine_maximum_mpps.sh | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/queuelat/determine_maximum_mpps.sh b/src/queuelat/determine_maximum_mpps.sh index cf7a8ca..cd45454 100755 --- a/src/queuelat/determine_maximum_mpps.sh +++ b/src/queuelat/determine_maximum_mpps.sh @@ -8,6 +8,7 @@ PREAMBLE="taskset -c 2 chrt -f 1" MAXLAT="20000" CYCLES_PER_PACKET="300" +OUTFILE=/usr/tmp/outfile echo "Determining maximum mpps the machine can handle" echo "Will take a few minutes to determine mpps value" @@ -16,10 +17,10 @@ echo "And 10 minutes run to confirm the final mpps value is stable" for mpps in `seq 3 3 50`; do echo testing $mpps Mpps - outfile=`mktemp` - $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile + OUTFILE=`mktemp` + $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE - exceeded=`grep exceeded $outfile` + exceeded=`grep exceeded $OUTFILE` if [ ! -z "$exceeded" ]; then echo mpps failed: $mpps break; @@ -32,10 +33,10 @@ first_mpps=$(($mpps - 1)) for mpps in `seq $first_mpps -1 3`; do echo testing $mpps Mpps - outfile=`mktemp` - $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile + OUTFILE=`mktemp` + $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE - exceeded=`grep exceeded $outfile` + exceeded=`grep exceeded $OUTFILE` if [ -z "$exceeded" ]; then echo mpps success $mpps break; @@ -49,10 +50,10 @@ echo second loop mpps: $mpps for mpps in `seq $second_mpps 0.3 $first_mpps`; do echo testing $mpps Mpps - outfile=`mktemp` - $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile + OUTFILE=`mktemp` + $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE - exceeded=`grep exceeded $outfile` + exceeded=`grep exceeded $OUTFILE` if [ ! -z "$exceeded" ]; then echo mpps failure $mpps break; @@ -66,10 +67,10 @@ third_mpps=`echo "$mpps -0.1" | bc` for mpps in `seq $third_mpps -0.1 3`; do echo testing $mpps Mpps - outfile=`mktemp` - $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile + OUTFILE=`mktemp` + $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE - exceeded=`grep exceeded $outfile` + exceeded=`grep exceeded $OUTFILE` if [ -z "$exceeded" ]; then echo mpps success $mpps break; @@ -86,8 +87,8 @@ while [ $queuelat_failure == 1 ]; do echo "$mpps Mpps" for i in `seq 1 10`; do - $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile - exceeded=`grep exceeded $outfile` + $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE + exceeded=`grep exceeded $OUTFILE` if [ ! -z "$exceeded" ]; then echo "mpps failure (run $i) $mpps" @@ -108,8 +109,8 @@ while [ $queuelat_failure == 1 ]; do echo -n "Starting 10 minutes run with " echo "$mpps Mpps" - $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `./get_cpuinfo_mhz.sh` -p $mpps -t 600 > $outfile - exceeded=`grep exceeded $outfile` + $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 600 > $OUTFILE + exceeded=`grep exceeded $OUTFILE` if [ ! -z "$exceeded" ]; then echo "mpps failure (run $i) $mpps" @@ -124,5 +125,3 @@ echo Final mpps is: $mpps unset queuelat_failure unset mpps - - |