-
Notifications
You must be signed in to change notification settings - Fork 18
/
ashplot.html
353 lines (256 loc) · 10.8 KB
/
ashplot.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Tue Jun 4 12:55:42 2024 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>ashplot</title>
</head>
<body>
<h1 align="center">ashplot</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#COPYRIGHT">COPYRIGHT</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">ashplot −
Create a plot of ash data</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>ashplot
[options] -l u/p@c ashplot.rwl</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>ashplot
[options] -l u/p@c ashplot.rwl title text</b></p>
<p style="margin-left:11%; margin-top: 1em">The ashplot
command is used to create a plot of ash data in several
different ways:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p>1.</p></td>
<td width="3%"></td>
<td width="83%">
<p>Output a single image using X-Windows when DISPLAY is
properly set or using Microsoft Windows.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p>2.</p></td>
<td width="3%"></td>
<td width="83%">
<p>Create an image file in svg and/or png format.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p>3.</p></td>
<td width="3%"></td>
<td width="83%">
<p>Output a continuously updated window using X-Windows or
Microsoft Windows.</p></td></tr>
</table>
<p style="margin-left:11%; margin-top: 1em">All output is
generated using the gnuplot which therefore must be
installed.</p>
<p style="margin-left:11%; margin-top: 1em">The data used
to generate the graphs is retrieved from either live data in
gv$active_session_history or from the awr repository in
dba_hist_active_sess_history. The former is used by default,
the latter is used if you provide the <b>--dbid</b>
option.</p>
<p style="margin-left:11%; margin-top: 1em">If you do not
provide one of the output options, no graph is created, but
you will be shown a date interval (with minute resolution)
for which data is available. If your goal is to graph data
from the awr repository, you are suggested to first use
awrreport to identify the databases, instances and snapshot
ranges available. This is particularly useful if you are
working with an awr repository that contains awr imports
from other databases.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>-l u/p <br>
-l u/p@c</b></p>
<p style="margin-left:17%;">Compulsory option to provide
the username, password, and potentially connect string for a
database connection that provides access to the necessary
gv$ and dba_hist views. If you omit /p, ashplot will prompt
for the password.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--dbid=<dbid></b></p>
<p style="margin-left:17%;">Without this option, data in
gv$active_session_history will be used. With this option,
data in dba_hist_active_sess_history from the database with
the provided dbid will be used.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--fromtime=YYYY.MM.DDTHH24:MI
<br>
--totime=YYYY.MM.DDTHH24:MI</b></p>
<p style="margin-left:17%;">The output will be limited to
the specified date/time range. Note that dates must be in
the exact format shown, which is also the format used when
outputting the available date range. You can omit : and the
MI part or T and the entire time part, and you can use
either or both of these options.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--fromminutes=N</b></p>
<p style="margin-left:17%;">Output will be limited to only
include data from at most N minutes ago. If you use this
option together with either of the previous two, time limits
from all will apply.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--output-X</b></p>
<p style="margin-left:17%;">Output the graph using
X-Windows; this requires a properly set DISPLAY environment
variable.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--output-png=file.png
<br>
--output-svg=file.svg</b></p>
<p style="margin-left:17%;">Create output as an image file
in either png or svg format.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--output-image=file</b></p>
<p style="margin-left:17%;">Create output as an image in
both png and svg formats; the file names will be suffixed
with .png and .svg respectively.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--no-svgmouse</b></p>
<p style="margin-left:17%;">If an svg file is being output,
do not include mouse javascript code in the file. This is
only relevant if your gnuplot version is older than 4.6.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--include-sys</b></p>
<p style="margin-left:17%;">By default, data from anything
running under SYS (i.e. with userid of 0) is excluded; if
you include this option SYS data will be included.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--maxsessions=N</b></p>
<p style="margin-left:17%;">By default, the y-axis will
cover the range from 0 to the largest number of sessions. If
there are a few large spikes, this implies the bulk of the
data is shown in only a small part of the y-axis. You can
use this option to decrease the range of the y-axis such
that the bulk of the data is represented on a larger part of
the axis.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--w-pixels=N
<br>
--h-pixels=N</b></p>
<p style="margin-left:17%;">Provide the width and/or height
of the image in pixels; the default is 640x480.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--boxwidth=N</b></p>
<p style="margin-left:17%;">By default, gnuplot
"widens" each plotted bar (box in gnuplot terms)
such that it touches the next bar, which ensures a plot that
has no holes along the x-axis. If the range is short or you
otherwise only have few data points available, you can
alternatively make a plot that has holes at missing data
points if you set a fixed boxwidth using this option. You
need to experiment until you find a proper value starting
with the value 1; values above 3 or 4 are unlikely to
produce nice plots.</p>
<p style="margin-left:11%; margin-top: 1em"><b>--autoupdate=N
<br>
--maxautoupdate=N</b></p>
<p style="margin-left:17%;">When using X-Windows or
Microsoft Windows to output the graph, you can use the
--autoupdate option to make the graph updated every so
often. As a result you will see a continuously updated
window similar to how performance tools do it. The display
will finish after 3600s, unless a different value is set
using --maxautoupdate or it is terminated by pressing
ctrl-c.</p>
<p style="margin-left:17%; margin-top: 1em">When using auto
update, --output-X and --fromminutes=5 are set by default,
and none of the options --fromtime, --totime, --dbid and
those handling image file output are used.</p>
<p style="margin-left:11%; margin-top: 1em"><b>title
text</b></p>
<p style="margin-left:17%;">If there are positional
arguments in addition to options, they will be used as the
plot title, which otherwise will have a generated default
including the start date and time of the plot.</p>
<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">This example
shows how you can progressively narrow down a certain
database and period for which you create the ash plots.
Start by listing all available databases and instances in
some repository:</p>
<pre style="margin-left:11%;">awrreport -l system/{password}@tnsalias</pre>
<p style="margin-left:11%; margin-top: 1em">which may
generate an output like:</p>
<p style="margin-left:11%; margin-top: 1em">dbid con snap
cnt instance list <br>
----------- --- -------- ------------- <br>
607296874 / 400 1,2 <br>
957347207 P 2 1,2 <br>
4001460110 12321 1,2,3,4,5,6,7,8</p>
<p style="margin-left:11%; margin-top: 1em">This tells that
there is data from three databases available in the
repository. Assume the last one is the interesting one, so
first create a plot using X-Windows covering the whole
available range:</p>
<p style="margin-left:11%; margin-top: 1em">ashplot
--output-X --dbid=4001460110 -l
system/{password}@tnsalias</p>
<p style="margin-left:11%; margin-top: 1em">which first
will show the actual available range and then (potentially
after some time) create the plot:</p>
<p style="margin-left:11%; margin-top: 1em">Data available
between 2022.03.21T00:47 and 2022.04.02T23:59</p>
<p style="margin-left:11%; margin-top: 1em">You may then
want to narrow down the actual time for which the plot it
produced: <br>
ashplot --output-X --fromtime=2022.04.01T12
--totime=2022.04.02T12 --dbid=4001460110 -l
system/{password}@tnsalias</p>
<p style="margin-left:11%; margin-top: 1em">And finally,
you may want to reduce it further, also create image files,
and also include SYS sessions: <br>
ashplot --svgmouse --output-image=/var/www/html/myash/myplot
--include-sys --fromtime=2022.04.01T17:30
--totime=2022.04.01T20:30 --output-X --dbid=4001460110 -l
system/{password}@tnsalias</p>
<p style="margin-left:11%; margin-top: 1em">The image files
will be put in the directory /var/www/html/myash, and will
be named myplot.png and myplot.svg respectively; if you view
the latter in a browser, it will be clickable. You can see
an actual sample image at
https://github.com/oracle/rwloadsim/blob/master/docs/sample-ash.png.</p>
<p style="margin-left:11%; margin-top: 1em">This final
example shows how you can plot all available live data (i.e.
from gv$active_session_history): <br>
ashplot --include-sys --output-X -l
system/{password}@tnsalias</p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">If there are
many ash samples, generating the data and subsequently using
gnuplot takes a long time.</p>
<h2>COPYRIGHT
<a name="COPYRIGHT"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Copyright
© 2023 Oracle Corporation <br>
Licensed under the Universal Permissive License v 1.0 as
shown at https://oss.oracle.com/licenses/upl</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><a href="rwloadsim.html">rwloadsim(1rwl)</a>,
<a href="awrreport.html">awrreport(2rwl)</a>, <a href="utilities.html">utilities(2rwl)</a></p>
<hr>
</body>
</html>