11#! /bin/bash
2- # Copyright (c) 2021, 2024 Oracle Corporation
2+ # Copyright (c) 2021, 2025 Oracle Corporation
33# Licensed under the Universal Permissive License v 1.0
44# as shown at https://oss.oracle.com/licenses/upl/
55
66# Changes:
77#
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
812# lpierce 17-oct-2024 added awr_replication_cmd execution
913# bengsig 8-may-2024 global osstat
1014# bengsig 2-may-2024 --fractiles-dropped option to oltpplot
5559done
5660shift
5761
62+ unset GNUTERM
63+
5864if test $help = yes
5965then
6066 cat << HELP
@@ -230,6 +236,7 @@ cp $resultsdir$subdir$runnumber/header.plot $resultsdir$subdir${runnumber}/time.
230236cp $resultsdir$subdir$runnumber /header.plot $resultsdir$subdir ${runnumber} /tp.plot
231237cp $resultsdir$subdir$runnumber /header.plot $resultsdir$subdir ${runnumber} /ash.plot
232238cp $resultsdir$subdir$runnumber /header.plot $resultsdir$subdir ${runnumber} /e2e.plot
239+ cp $resultsdir$subdir$runnumber /header.plot $resultsdir$subdir ${runnumber} /memory.plot
233240
234241# make the primary plot called res.svg/res.png
235242cat >> $resultsdir$subdir$runnumber /res.plot << END
@@ -268,12 +275,13 @@ cat >> $resultsdir$subdir${runnumber}/tp.plot <<END
268275set title "$runnumber throughput $komment "
269276set yrange [0:*]
270277set ytics nomirror
271- # set y2range [0:*]
272- # set y2tics
278+ set y2range [0:*]
279+ set y2tics
273280set key bmargin horizontal
274281set xtics $xtics
275282set xlabel "seconds after $rundate "
276283set ylabel "thousand rows per second per process"
284+ set y2label "total throughput thousand rows per second"
277285
278286set terminal png size imgwidth,480
279287set 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
285293 "$resultsdir$subdir ${runnumber} /mtit.csv" using 1:6 with lines lw $lw lc rgb "blue" title "5", \
286294 "$resultsdir$subdir ${runnumber} /mtit.csv" using 1:7 with lines lw $lw lc rgb "dark-orange" title "6", \
287295 "$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"
289298
290299
291300set terminal svg $svgmouse size imgwidth,480 $dynamic
@@ -321,6 +330,48 @@ replot
321330END
322331gnuplot -persist $resultsdir$subdir ${runnumber} /e2e.plot
323332
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+
324375# generate the ash - note that we sometimes only do png as the svg file becomes extremely
325376# large
326377cat >> $resultsdir$subdir ${runnumber} /ash.plot << END
346397 set output "$awrdirectory$subdir$runnumber /${runnumber} _ash.svg"
347398 replot
348399END
349- svgash=" <a href=" ${runnumber} _ash.svg" >${runnumber} _ash.svg"
400+ svgash=" <a href=" ${runnumber} _ash.svg.html " >${runnumber} _ash.svg"
350401 ashimg=${runnumber} _ash.svg
351402else
352403 svgash=" not created"
359410
360411xtraawrs=` cat $resultsdir$subdir ${runnumber} /xtraawrs.txt`
361412
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+
362422# write a table with links to all details
363423cat << END > $awrdirectory$subdir$runnumber /index.html
364424<!DOCTYPE html>
365425<H2>All details for $proccount processes $komment at $rundate </H2>
366426<table>
367427<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>
372433END
373434
374435if test -f $awrdirectory$subdir$runnumber /${runnumber} _osstat.svg
@@ -377,12 +438,12 @@ then
377438 cat >> $awrdirectory$subdir$runnumber /index.html << END
378439 <tr>
379440 <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>
381442 <td><a href="${runnumber} _osstat.png">${runnumber} _osstat.png</a></td>
382443 </tr>
383444 <tr>
384445 <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>
386447 <td><a href="${runnumber} _osstatg.png">${runnumber} _osstatg.png</a></td>
387448 </tr>
388449END
@@ -428,6 +489,11 @@ cat <<END >> $awrdirectory$subdir$runnumber/index.html
428489<embed src="${runnumber} _e2e.svg"><br>
429490END
430491
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+
431497if test $ashcsvcount -gt 0
432498then
433499 echo ' <embed src="' $ashimg ' "><br>' >> $awrdirectory$subdir$runnumber /index.html
440506
441507if [ -n " $awr_replication_cmd " ]; then
442508 eval $awr_replication_cmd
443- fi
509+ fi
0 commit comments