queuelat: Assume queuelat and queuelat scripts are in the path
PATCH 1/2 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 <[email protected]>
--- src/queuelat/determine_maximum_mpps.sh | 35 +++++++++++++------------- 1 file changed, 17 insertions(+), 18 deletions(-)
src/queuelat/determine_maximum_mpps.sh +17 -18
@@ -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 - -
Signature · 1 line
2.20.1
PATCH 2/2 queuelat: Install queuelat helper scripts from the rt-tests Makefile
Install queuelat helper scripts from the rt-tests Makefile
Signed-off-by John Kacur <[email protected]>
--- Makefile | 2 ++ 1 file changed, 2 insertions(+)
Makefile +2 -0
@@ -180,6 +180,8 @@ install: all install_hwlatdetect mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man4" mkdir -p "$(DESTDIR)$(srcdir)" "$(DESTDIR)$(mandir)/man8" cp $(TARGETS) "$(DESTDIR)$(bindir)" + install src/queuelat/get_cpuinfo_mhz.sh "$(DESTDIR)$(bindir)" + install src/queuelat/determine_maximum_mpps.sh "${DESTDIR}${bindir}" gzip -c src/cyclictest/cyclictest.8 >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz" gzip -c src/pi_tests/pi_stress.8 >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz" gzip -c src/ptsematest/ptsematest.8 >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
Signature · 1 line
2.20.1