Mercurial > hg > graal-compiler
annotate test/gc/6941923/test6941923.sh @ 6112:55954061c6e8 jdk8-b42
Added tag hs24-b13 for changeset bd568544be7f
author | amurillo |
---|---|
date | Fri, 01 Jun 2012 15:24:09 -0700 |
parents | 037973617842 |
children | 6acee021f5ac |
rev | line source |
---|---|
3767
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
1 ## |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
2 ## @test @(#)test6941923.sh |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
3 ## @bug 6941923 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
4 ## @summary test new added flags for gc log rotation |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
5 ## @author yqi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
6 ## @run shell test6941923.sh |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
7 ## |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
8 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
9 ## skip on windows |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
10 OS=`uname -s` |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
11 case "$OS" in |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
12 SunOS | Linux ) |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
13 NULL=/dev/null |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
14 PS=":" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
15 FS="/" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
16 ;; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
17 Windows_* ) |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
18 echo "Test skipped for Windows" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
19 exit 0 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
20 ;; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
21 * ) |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
22 echo "Unrecognized system!" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
23 exit 1; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
24 ;; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
25 esac |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
26 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
27 if [ "${JAVA_HOME}" = "" ] |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
28 then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
29 echo "JAVA_HOME not set" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
30 exit 0 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
31 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
32 |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3767
diff
changeset
|
33 $JAVA_HOME/bin/java ${TESTVMOPTS} -version > $NULL 2>&1 |
3767
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
34 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
35 if [ $? != 0 ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
36 echo "Wrong JAVA_HOME? JAVA_HOME: $JAVA_HOME" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
37 exit $? |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
38 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
39 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
40 # create a small test case |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
41 testname="Test" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
42 if [ -e ${testname}.java ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
43 rm -rf ${testname}.* |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
44 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
45 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
46 cat >> ${testname}.java << __EOF__ |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
47 import java.util.Vector; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
48 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
49 public class Test implements Runnable |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
50 { |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
51 private boolean _should_stop = false; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
52 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
53 public static void main(String[] args) throws Exception { |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
54 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
55 long limit = Long.parseLong(args[0]) * 60L * 1000L; // minutes |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
56 Test t = new Test(); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
57 t.set_stop(false); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
58 Thread thr = new Thread(t); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
59 thr.start(); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
60 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
61 long time1 = System.currentTimeMillis(); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
62 long time2 = System.currentTimeMillis(); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
63 while (time2 - time1 < limit) { |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
64 try { |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
65 Thread.sleep(2000); // 2 seconds |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
66 } |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
67 catch(Exception e) {} |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
68 time2 = System.currentTimeMillis(); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
69 System.out.print("\r... " + (time2 - time1)/1000 + " seconds"); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
70 } |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
71 System.out.println(); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
72 t.set_stop(true); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
73 } |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
74 public void set_stop(boolean value) { _should_stop = value; } |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
75 public void run() { |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
76 int cap = 20000; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
77 int fix_size = 2048; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
78 int loop = 0; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
79 Vector< byte[] > v = new Vector< byte[] >(cap); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
80 while(!_should_stop) { |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
81 byte[] g = new byte[fix_size]; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
82 v.add(g); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
83 loop++; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
84 if (loop > cap) { |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
85 v = null; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
86 cap *= 2; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
87 if (cap > 80000) cap = 80000; |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
88 v = new Vector< byte[] >(cap); |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
89 } |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
90 } |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
91 } |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
92 } |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
93 __EOF__ |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
94 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
95 msgsuccess="succeeded" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
96 msgfail="failed" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
97 gclogsize="16K" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
98 filesize=$((16*1024)) |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
99 $JAVA_HOME/bin/javac ${testname}.java > $NULL 2>&1 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
100 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
101 if [ $? != 0 ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
102 echo "$JAVA_HOME/bin/javac ${testname}.java $fail" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
103 exit -1 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
104 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
105 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
106 # test for 2 minutes, it will complete circulation of gc log rotation |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
107 tts=2 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
108 logfile="test.log" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
109 hotspotlog="hotspot.log" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
110 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
111 if [ -e $logfile ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
112 rm -rf $logfile |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
113 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
114 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
115 #also delete $hotspotlog if it exists |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
116 if [ -f $hotspotlog ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
117 rm -rf $hotspotlog |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
118 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
119 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
120 options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=$gclogsize" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
121 echo "Test gc log rotation in same file, wait for $tts minutes ...." |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3767
diff
changeset
|
122 $JAVA_HOME/bin/java ${TESTVMOPTS} $options $testname $tts |
3767
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
123 if [ $? != 0 ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
124 echo "$msgfail" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
125 exit -1 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
126 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
127 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
128 # rotation file will be $logfile.0 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
129 if [ -f $logfile.0 ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
130 outfilesize=`ls -l $logfile.0 | awk '{print $5 }'` |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
131 if [ $((outfilesize)) -ge $((filesize)) ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
132 echo $msgsuccess |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
133 else |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
134 echo $msgfail |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
135 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
136 else |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
137 echo $msgfail |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
138 exit -1 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
139 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
140 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
141 # delete log file |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
142 rm -rf $logfile.0 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
143 if [ -f $hotspotlog ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
144 rm -rf $hotspotlog |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
145 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
146 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
147 #multiple log files |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
148 numoffiles=3 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
149 options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=$numoffiles -XX:GCLogFileSize=$gclogsize" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
150 echo "Test gc log rotation in $numoffiles files, wait for $tts minutes ...." |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3767
diff
changeset
|
151 $JAVA_HOME/bin/java ${TESTVMOPTS} $options $testname $tts |
3767
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
152 if [ $? != 0 ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
153 echo "$msgfail" |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
154 exit -1 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
155 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
156 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
157 atleast=0 # at least size of numoffile-1 files >= $gclogsize |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
158 tk=0 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
159 while [ $(($tk)) -lt $(($numoffiles)) ] |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
160 do |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
161 if [ -f $logfile.$tk ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
162 outfilesize=`ls -l $logfile.$tk | awk '{ print $5 }'` |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
163 if [ $(($outfilesize)) -ge $(($filesize)) ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
164 atleast=$((atleast+1)) |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
165 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
166 fi |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
167 tk=$((tk+1)) |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
168 done |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
169 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
170 rm -rf $logfile.* |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
171 rm -rf $testname.* |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
172 rm -rf $hotspotlog |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
173 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
174 if [ $(($atleast)) -ge $(($numoffiles-1)) ]; then |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
175 echo $msgsuccess |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
176 else |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
177 echo $msgfail |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
178 exit -1 |
2a241e764894
6941923: RFE: Handling large log files produced by long running Java Applications
minqi
parents:
diff
changeset
|
179 fi |