filename="text1.rtf"

# Draft script by Roy Wilson used on Redhat6.1 system (bash)
# Assume ONLY HelloWorld servlet being used: better to have a set, but what?
# 
# To promote comparability, run script immediately after a cold boot
echo Run script only after a cold boot to make results comparable
echo When done please and post the summary file to Tomcat dev list
echo Usage: 
echo        sh tcscript servlet-name max-concurrency increment
echo Example:
echo        sh tcscript HelloWorldExample 100 10
rm -f summary
sh tcscript 1 $1
load="$3"
while [ "$load" -le "$2" ] 
do
        echo "Starting ab with load = " $load
        sh tcscript $load $1
        load=$(($load+$3))
done


# Roy Wilson 11/2/00

echo "Starting ab load test with C = " $1 "and servlet = "$2
rm -f $1$2.sardata
# Next 2 lines may need adjustment on account of OS differences
# Start with a fresh temporary system accounting log file
date >> summary
cp /var/log/savacct /var/log/tcacct
/usr/sbin/accton /var/log/tcacct
# sample CPU and disk usage with 1 second resolution
(sar -u -b -o $1$2.sardata 1 > /dev/null )&
sarpid=$!
# modify path in next line for use of servlet
/usr/sbin/ab -n 100000 -c $1 http://ALFRED:8080/examples/servlet/$2 >> summary  
kill -s TERM ${sarpid}
# Next line may need modification: Turns off system accounting
/usr/sbin/accton
# peel off raw data, keep sar summary line
sar -f $1$2.sardata 1 | grep Average >> summary
# collect CPU per minute data from system accounting package 
/usr/sbin/sa -a /var/log/tcacct >> summary
rm -f $1$2.sardata 
echo "Finished ab load test with C = "$1 "and servlet = "$2
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to