JBoss Native SVN: r2573 - in sandbox/httpd: perfs and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-10-06 04:35:36 -0400 (Tue, 06 Oct 2009)
New Revision: 2573
Added:
sandbox/httpd/perfs/
sandbox/httpd/perfs/README
sandbox/httpd/perfs/httpd.mem
sandbox/httpd/perfs/httpd.pro
sandbox/httpd/perfs/httpd.sh
sandbox/httpd/perfs/thr.sh
sandbox/httpd/perfs/trans.sh
Log:
Add the script that were/are used to compare the different front-ends.
Added: sandbox/httpd/perfs/README
===================================================================
--- sandbox/httpd/perfs/README (rev 0)
+++ sandbox/httpd/perfs/README 2009-10-06 08:35:36 UTC (rev 2573)
@@ -0,0 +1,5 @@
+The files here are to extract information of the performance (load test).
+The client is in mod_cluster (test/java... Client.java) and the war is myapp.war
+- httpd.test (returns mem 61425828 pro: 0.7 for example)
+- trans.sh (give it a parameter like 2009:12:26:4) and adjust access_log location... Gives req/s * 10.
+- thr.sh (Gives the troughput).
Added: sandbox/httpd/perfs/httpd.mem
===================================================================
--- sandbox/httpd/perfs/httpd.mem (rev 0)
+++ sandbox/httpd/perfs/httpd.mem 2009-10-06 08:35:36 UTC (rev 2573)
@@ -0,0 +1,12 @@
+top -b -n 1 | grep httpd | awk ' { print $5 } ' > toto
+tot=0
+for i in `cat toto`
+do
+ case $i in
+ *m)
+ i=`echo $i | sed 's:m::' | awk ' { print $1*1024 } '`
+ ;;
+ esac
+ tot=`expr $tot + $i`
+done
+echo $tot
Property changes on: sandbox/httpd/perfs/httpd.mem
___________________________________________________________________
Name: svn:executable
+ *
Added: sandbox/httpd/perfs/httpd.pro
===================================================================
--- sandbox/httpd/perfs/httpd.pro (rev 0)
+++ sandbox/httpd/perfs/httpd.pro 2009-10-06 08:35:36 UTC (rev 2573)
@@ -0,0 +1,7 @@
+top -b -n 1 | grep httpd | awk ' { print $9 } ' > toto
+tot=0
+for i in `cat toto`
+do
+ tot=`expr $tot + $i`
+done
+echo $tot
Property changes on: sandbox/httpd/perfs/httpd.pro
___________________________________________________________________
Name: svn:executable
+ *
Added: sandbox/httpd/perfs/httpd.sh
===================================================================
--- sandbox/httpd/perfs/httpd.sh (rev 0)
+++ sandbox/httpd/perfs/httpd.sh 2009-10-06 08:35:36 UTC (rev 2573)
@@ -0,0 +1,19 @@
+tpro=0
+tmem=0
+count=0
+while [ $count -lt 20 ]
+do
+pro=`bash httpd.pro`
+mem=`bash httpd.mem`
+echo "pro: $pro"
+echo "mem: $mem"
+tpro=`expr $tpro + $pro`
+tmem=`expr $tmem + $mem`
+sleep 1
+count=`expr $count + 1`
+done
+
+tipro=`expr $tpro / 2`
+echo "tpro: $tpro / 20 !!! $tipro"
+timem=`expr $tmem / 20`
+echo "tmem: $tmem !!! $timem"
Property changes on: sandbox/httpd/perfs/httpd.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: sandbox/httpd/perfs/thr.sh
===================================================================
--- sandbox/httpd/perfs/thr.sh (rev 0)
+++ sandbox/httpd/perfs/thr.sh 2009-10-06 08:35:36 UTC (rev 2573)
@@ -0,0 +1,16 @@
+while true
+do
+/sbin/ifconfig eth3 > toto
+sleep 10
+/sbin/ifconfig eth3 > titi
+#RX bytes:738565473 (704.3 MiB) TX bytes:312268230 (297.8 MiB)
+in1=`grep "RX bytes" toto | sed 's/:/ /g' | awk ' { print $3 } '`
+ou1=`grep "RX bytes" toto | sed 's/:/ /g' | awk ' { print $8 } '`
+in2=`grep "RX bytes" titi | sed 's/:/ /g' | awk ' { print $3 } '`
+ou2=`grep "RX bytes" titi | sed 's/:/ /g' | awk ' { print $8 } '`
+in=`expr $in2 - $in1`
+ou=`expr $ou2 - $ou1`
+to=`expr $in + $ou`
+to=`expr $to / 10240`
+echo "to: $to kbytes/sec"
+done
Added: sandbox/httpd/perfs/trans.sh
===================================================================
--- sandbox/httpd/perfs/trans.sh (rev 0)
+++ sandbox/httpd/perfs/trans.sh 2009-10-06 08:35:36 UTC (rev 2573)
@@ -0,0 +1,10 @@
+tc=0
+val=$1
+for i in 0 1 2 3 4 5 6 8 9
+do
+ # count=`grep 12:16:2$i opt/jboss/httpd/httpd/logs/access_log | wc -l`
+ # 09:27:11
+ count=`grep $val$i /tmp/jbento/logs/access_log | wc -l`
+ tc=`expr $tc + $count`
+done
+echo $tc
Property changes on: sandbox/httpd/perfs/trans.sh
___________________________________________________________________
Name: svn:executable
+ *