Author: jfrederic.clere(a)jboss.com
Date: 2009-10-06 10:07:07 -0400 (Tue, 06 Oct 2009)
New Revision: 2574
Modified:
sandbox/httpd/perfs/thr.sh
Log:
Use temporary file names.
Modified: sandbox/httpd/perfs/thr.sh
===================================================================
--- sandbox/httpd/perfs/thr.sh 2009-10-06 08:35:36 UTC (rev 2573)
+++ sandbox/httpd/perfs/thr.sh 2009-10-06 14:07:07 UTC (rev 2574)
@@ -1,13 +1,14 @@
while true
do
-/sbin/ifconfig eth3 > toto
+/sbin/ifconfig eth3 > $$.1
sleep 10
-/sbin/ifconfig eth3 > titi
+/sbin/ifconfig eth3 > $$.2
#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 }
'`
+in1=`grep "RX bytes" $$.1 | sed 's/:/ /g' | awk ' { print $3 }
'`
+ou1=`grep "TX bytes" $$.1 | sed 's/:/ /g' | awk ' { print $8 }
'`
+in2=`grep "RX bytes" $$.2 | sed 's/:/ /g' | awk ' { print $3 }
'`
+ou2=`grep "TX bytes" $$.2 | sed 's/:/ /g' | awk ' { print $8 }
'`
+rm $$.1 $$.2
in=`expr $in2 - $in1`
ou=`expr $ou2 - $ou1`
to=`expr $in + $ou`
Show replies by date