1
1
#! /bin/bash
2
- # Copyright (c) 2021, 2024 Oracle Corporation
2
+ # Copyright (c) 2021, 2025 Oracle Corporation
3
3
# Licensed under the Universal Permissive License v 1.0
4
4
# as shown at https://oss.oracle.com/licenses/upl/
5
5
6
6
# Changes:
7
7
#
8
+ # bengsig 24-feb-2024 Remove a debug echo, add total throughput
9
+ # bengsig 13-feb-2025 unset GNUTERM to prevent potential warnings
10
+ # bengsig 28-jan-2025 svg links use embed due to Chrome issue
11
+ # bengsig 10-jan-2025 add memory plot to mtit workload
8
12
# lpierce 17-oct-2024 added awr_replication_cmd execution
9
13
# bengsig 8-may-2024 global osstat
10
14
# bengsig 2-may-2024 --fractiles-dropped option to oltpplot
55
59
done
56
60
shift
57
61
62
+ unset GNUTERM
63
+
58
64
if test $help = yes
59
65
then
60
66
cat << HELP
@@ -230,6 +236,7 @@ cp $resultsdir$subdir$runnumber/header.plot $resultsdir$subdir${runnumber}/time.
230
236
cp $resultsdir$subdir$runnumber /header.plot $resultsdir$subdir ${runnumber} /tp.plot
231
237
cp $resultsdir$subdir$runnumber /header.plot $resultsdir$subdir ${runnumber} /ash.plot
232
238
cp $resultsdir$subdir$runnumber /header.plot $resultsdir$subdir ${runnumber} /e2e.plot
239
+ cp $resultsdir$subdir$runnumber /header.plot $resultsdir$subdir ${runnumber} /memory.plot
233
240
234
241
# make the primary plot called res.svg/res.png
235
242
cat >> $resultsdir$subdir$runnumber /res.plot << END
@@ -268,12 +275,13 @@ cat >> $resultsdir$subdir${runnumber}/tp.plot <<END
268
275
set title "$runnumber throughput $komment "
269
276
set yrange [0:*]
270
277
set ytics nomirror
271
- # set y2range [0:*]
272
- # set y2tics
278
+ set y2range [0:*]
279
+ set y2tics
273
280
set key bmargin horizontal
274
281
set xtics $xtics
275
282
set xlabel "seconds after $rundate "
276
283
set ylabel "thousand rows per second per process"
284
+ set y2label "total throughput thousand rows per second"
277
285
278
286
set terminal png size imgwidth,480
279
287
set output "$awrdirectory$subdir$runnumber /${runnumber} _tp.png"
@@ -285,7 +293,8 @@ plot "$resultsdir$subdir${runnumber}/mtit.csv" using 1:2 with lines lw $lw lc rg
285
293
"$resultsdir$subdir ${runnumber} /mtit.csv" using 1:6 with lines lw $lw lc rgb "blue" title "5", \
286
294
"$resultsdir$subdir ${runnumber} /mtit.csv" using 1:7 with lines lw $lw lc rgb "dark-orange" title "6", \
287
295
"$resultsdir$subdir ${runnumber} /mtit.csv" using 1:8 with lines lw $lw lc rgb "orange" title "7", \
288
- "$resultsdir$subdir ${runnumber} /mtit.csv" using 1:9 with lines lw $lw lc rgb "dark-green" title "8"
296
+ "$resultsdir$subdir ${runnumber} /mtit.csv" using 1:9 with lines lw $lw lc rgb "dark-green" title "8" ,\
297
+ "$resultsdir$subdir ${runnumber} /mtit.csv" using 1:(\$ 2+\$ 3+\$ 4+\$ 5+\$ 6+\$ 7+\$ 8) with lines axes x1y2 lw $lw lc rgb "gray20" title "total"
289
298
290
299
291
300
set terminal svg $svgmouse size imgwidth,480 $dynamic
@@ -321,6 +330,48 @@ replot
321
330
END
322
331
gnuplot -persist $resultsdir$subdir ${runnumber} /e2e.plot
323
332
333
+ # buffer cache, shared pool and pga
334
+ cat >> $resultsdir$subdir ${runnumber} /memory.plot << END
335
+ set title "$runnumberintitle Database memory (GiB) $titletext "
336
+ set logscale y
337
+ set ytics nomirror
338
+ set key bmargin horizontal
339
+ set xtics $xtics
340
+ set xlabel "$xlabel "
341
+
342
+ set terminal png size imgwidth,480
343
+ set output "$awrdirectory$subdir$runnumber /${runnumber} _memory.png"
344
+ plot "$resultsdir$subdir ${runnumber} /bcache.csv" using 1:2 with lines lw $lw lc rgb 'magenta' axes x1y1 title "bc 1", \\
345
+ "$resultsdir$subdir ${runnumber} /bcache.csv" using 1:3 with lines lw $lw lc rgb 'dark-red' axes x1y1 title "2", \\
346
+ "$resultsdir$subdir ${runnumber} /bcache.csv" using 1:4 with lines lw $lw lc rgb 'dark-green' axes x1y1 title "3", \\
347
+ "$resultsdir$subdir ${runnumber} /bcache.csv" using 1:5 with lines lw $lw lc rgb 'light-salmon' axes x1y1 title "4", \\
348
+ "$resultsdir$subdir ${runnumber} /bcache.csv" using 1:6 with lines lw $lw lc rgb 'dark-yellow' axes x1y1 title "5", \\
349
+ "$resultsdir$subdir ${runnumber} /bcache.csv" using 1:7 with lines lw $lw lc rgb 'light-green' axes x1y1 title "6", \\
350
+ "$resultsdir$subdir ${runnumber} /bcache.csv" using 1:8 with lines lw $lw lc rgb 'dark-orange' axes x1y1 title "7", \\
351
+ "$resultsdir$subdir ${runnumber} /bcache.csv" using 1:9 with lines lw $lw lc rgb 'skyblue' axes x1y1 title "8", \\
352
+ "$resultsdir$subdir ${runnumber} /sharedp.csv" using 1:2 with linespoints pt 4 lw $lw ps 0.5 lc rgb 'magenta' axes x1y1 title "sp 1", \\
353
+ "$resultsdir$subdir ${runnumber} /sharedp.csv" using 1:3 with linespoints pt 4 lw $lw ps 0.5 lc rgb 'dark-red' axes x1y1 notitle, \\
354
+ "$resultsdir$subdir ${runnumber} /sharedp.csv" using 1:4 with linespoints pt 4 lw $lw ps 0.5 lc rgb 'dark-green' axes x1y1 notitle, \\
355
+ "$resultsdir$subdir ${runnumber} /sharedp.csv" using 1:5 with linespoints pt 4 lw $lw ps 0.5 lc rgb 'light-salmon' axes x1y1 notitle, \\
356
+ "$resultsdir$subdir ${runnumber} /sharedp.csv" using 1:6 with linespoints pt 4 lw $lw ps 0.5 lc rgb 'dark-yellow' axes x1y1 notitle, \\
357
+ "$resultsdir$subdir ${runnumber} /sharedp.csv" using 1:7 with linespoints pt 4 lw $lw ps 0.5 lc rgb 'light-green' axes x1y1 notitle, \\
358
+ "$resultsdir$subdir ${runnumber} /sharedp.csv" using 1:8 with linespoints pt 4 lw $lw ps 0.5 lc rgb 'dark-orange' axes x1y1 notitle, \\
359
+ "$resultsdir$subdir ${runnumber} /sharedp.csv" using 1:9 with linespoints pt 4 lw $lw ps 0.5 lc rgb 'skyblue' axes x1y1 notitle, \\
360
+ "$resultsdir$subdir ${runnumber} /pga.csv" using 1:2 with linespoints pt 3 lw $lw ps 0.5 lc rgb 'magenta' axes x1y1 title "pga 1", \\
361
+ "$resultsdir$subdir ${runnumber} /pga.csv" using 1:3 with linespoints pt 3 lw $lw ps 0.5 lc rgb 'dark-red' axes x1y1 notitle, \\
362
+ "$resultsdir$subdir ${runnumber} /pga.csv" using 1:4 with linespoints pt 3 lw $lw ps 0.5 lc rgb 'dark-green' axes x1y1 notitle, \\
363
+ "$resultsdir$subdir ${runnumber} /pga.csv" using 1:5 with linespoints pt 3 lw $lw ps 0.5 lc rgb 'light-salmon' axes x1y1 notitle, \\
364
+ "$resultsdir$subdir ${runnumber} /pga.csv" using 1:6 with linespoints pt 3 lw $lw ps 0.5 lc rgb 'dark-yellow' axes x1y1 notitle, \\
365
+ "$resultsdir$subdir ${runnumber} /pga.csv" using 1:7 with linespoints pt 3 lw $lw ps 0.5 lc rgb 'light-green' axes x1y1 notitle, \\
366
+ "$resultsdir$subdir ${runnumber} /pga.csv" using 1:8 with linespoints pt 3 lw $lw ps 0.5 lc rgb 'dark-orange' axes x1y1 notitle, \\
367
+ "$resultsdir$subdir ${runnumber} /pga.csv" using 1:9 with linespoints pt 3 lw $lw ps 0.5 lc rgb 'skyblue' axes x1y1 notitle
368
+
369
+ set terminal svg $svgmouse size imgwidth,480 $dynamic
370
+ set output "$awrdirectory$subdir$runnumber /${runnumber} _memory.svg"
371
+ replot
372
+ END
373
+ gnuplot -persist $resultsdir$subdir ${runnumber} /memory.plot
374
+
324
375
# generate the ash - note that we sometimes only do png as the svg file becomes extremely
325
376
# large
326
377
cat >> $resultsdir$subdir ${runnumber} /ash.plot << END
346
397
set output "$awrdirectory$subdir$runnumber /${runnumber} _ash.svg"
347
398
replot
348
399
END
349
- svgash=" <a href=" ${runnumber} _ash.svg" >${runnumber} _ash.svg"
400
+ svgash=" <a href=" ${runnumber} _ash.svg.html " >${runnumber} _ash.svg"
350
401
ashimg=${runnumber} _ash.svg
351
402
else
352
403
svgash=" not created"
359
410
360
411
xtraawrs=` cat $resultsdir$subdir ${runnumber} /xtraawrs.txt`
361
412
413
+ # Make html embed versions of all svg file
414
+ (
415
+ cd $awrdirectory$subdir$runnumber
416
+ for svg in * .svg
417
+ do
418
+ svg2html $svg
419
+ done
420
+ )
421
+
362
422
# write a table with links to all details
363
423
cat << END > $awrdirectory$subdir$runnumber /index.html
364
424
<!DOCTYPE html>
365
425
<H2>All details for $proccount processes $komment at $rundate </H2>
366
426
<table>
367
427
<tr><td>Awr report(s)</td><td><a href="${runnumber} _awr.html">${runnumber} _awr.html</a></td> $xtraawrs </tr>
368
- <tr><td>Database cpu and time</td><td><a href="${runnumber} .svg">${runnumber} .svg</a></td><td><a href="${runnumber} .png">${runnumber} .png</a></td></tr>
369
- <tr><td>Sessions and instances</td><td><a href="${runnumber} _instdist.svg">${runnumber} _instdist.svg</a></td><td><a href="${runnumber} _instdist.png">${runnumber} _instdist.png</a></td></tr>
370
- <tr><td>Throughput</td><td><a href="${runnumber} _tp.svg">${runnumber} _tp.svg</a></td><td><a href="${runnumber} _tp.png">${runnumber} _tp.png</a></td></tr>
371
- <tr><td>End2end timing (ms)</td><td><a href="${runnumber} _e2e.svg">${runnumber} _e2e.svg</a></td><td><a href="${runnumber} _e2e.png">${runnumber} _e2e.png</a></td></tr>
428
+ <tr><td>Database cpu and time</td><td><a href="${runnumber} .svg.html">${runnumber} .svg</a></td><td><a href="${runnumber} .png">${runnumber} .png</a></td></tr>
429
+ <tr><td>Sessions and instances</td><td><a href="${runnumber} _instdist.svg.html">${runnumber} _instdist.svg</a></td><td><a href="${runnumber} _instdist.png">${runnumber} _instdist.png</a></td></tr>
430
+ <tr><td>Throughput</td><td><a href="${runnumber} _tp.svg.html">${runnumber} _tp.svg</a></td><td><a href="${runnumber} _tp.png">${runnumber} _tp.png</a></td></tr>
431
+ <tr><td>End2end timing (ms)</td><td><a href="${runnumber} _e2e.svg.html">${runnumber} _e2e.svg</a></td><td><a href="${runnumber} _e2e.png">${runnumber} _e2e.png</a></td></tr>
432
+ <tr><td>Database memory</td><td><a href="${runnumber} _memory.svg.html">${runnumber} _memory.svg</a></td><td><a href="${runnumber} _memory.png">${runnumber} _memory.png</a></td></tr>
372
433
END
373
434
374
435
if test -f $awrdirectory$subdir$runnumber /${runnumber} _osstat.svg
@@ -377,12 +438,12 @@ then
377
438
cat >> $awrdirectory$subdir$runnumber /index.html << END
378
439
<tr>
379
440
<td>Database server cpu (per instance) *</td>
380
- <td><a href="${runnumber} _osstat.svg">${runnumber} _osstat.svg</a></td>
441
+ <td><a href="${runnumber} _osstat.svg.html ">${runnumber} _osstat.svg</a></td>
381
442
<td><a href="${runnumber} _osstat.png">${runnumber} _osstat.png</a></td>
382
443
</tr>
383
444
<tr>
384
445
<td>Database server cpu (total) *</td>
385
- <td><a href="${runnumber} _osstatg.svg">${runnumber} _osstatg.svg</a></td>
446
+ <td><a href="${runnumber} _osstatg.svg.html ">${runnumber} _osstatg.svg</a></td>
386
447
<td><a href="${runnumber} _osstatg.png">${runnumber} _osstatg.png</a></td>
387
448
</tr>
388
449
END
@@ -428,6 +489,11 @@ cat <<END >> $awrdirectory$subdir$runnumber/index.html
428
489
<embed src="${runnumber} _e2e.svg"><br>
429
490
END
430
491
492
+ if test -s $awrdirectory$subdir$runnumber /${runnumber} _memory.svg
493
+ then
494
+ echo ' <embed src="' ${runnumber} _memory.svg' "><br>' >> $awrdirectory$subdir$runnumber /index.html
495
+ fi
496
+
431
497
if test $ashcsvcount -gt 0
432
498
then
433
499
echo ' <embed src="' $ashimg ' "><br>' >> $awrdirectory$subdir$runnumber /index.html
440
506
441
507
if [ -n " $awr_replication_cmd " ]; then
442
508
eval $awr_replication_cmd
443
- fi
509
+ fi
0 commit comments