awrreport

NAME
SYNOPSIS
OPTIONS
EXAMPLES
NOTES
BUG
COPYRIGHT
SEE ALSO

NAME

awrreport − Create an awr or ash report

SYNOPSIS

awrreport -l u/p@c [options]

List available awr repositories or create an actual awr or ash report. You normally start with only the -l option to identify the database, instance and snapshot ranges available. After having identified this, you can user other options to actually generate an awr or ash report.

OPTIONS

-l u/p
-l u/p@c

Compulsory option to provide the username, password, and potentially connect string for a database connection that provides access to a login with access to various the dba_ views containing the awr repository. If you omit /p, rwloadsim will prompt for the password.

--dbid=<dbid>

Without this option, provide a list of all available databases with the dbid in the awr repository. The list will indicate if the database is a root of a cdb, a pdb, or an imported awr dump. With this option, list snapshots available in the database with the chosen dbid. This option is required to generate awr or ash report.

--instance=<instance>

Limit the list of available snapshots to one particular instance or provide an instance for awr/ash generation.

--fromtime=YYYY.MM.DDTHH24:MI
--totime=YYYY.MM.DDTHH24:MI

Limit the list of snapshot to a date range; either or both options can be provided. Note that dates must be in the exact format shown, which is also the format used when outputting lists of snapshots. You can omit the : and MI or the T and the entire time part.

These options are also required when generating an ash report.

--no-headings

In the various lists, do not output headings.

--output-text

If generating an awr or ash, the output will be in text (ASCII) format. The default is html format.

--output-file=<filename>

If generating an awr or ash, the output is written to a file with default name based on the input. Use this option to specify a different filename.

--output-directory=<directory>

By default, the output is written in your current directory. Use this option to specify a different directory.

--begin-snap=N
--end-snap=N

If the --begin-snap option is provided an awr report will be created with that begin snapshot and and end snapshot 1 higher, unless the --end-snap option is used to specify a different end snapshot. If --instance is provided, an instance specific awr report is created, otherwise a global awr report is created. The --dbid option is required.

--ash-slot-width

Generate an ash report using the slot width (in seconds). All of --dbid, --instance, --fromtime, --totime a are needed as well.

EXAMPLES

awrreport -l system/{password}

which may generate an output like:

       dbid con snap cnt instance list
----------- --- -------- -------------
  607296874  /       408 1,2
 4001460110        12321 1,2,3,4,5,6,7,8

This tells that there is data from two databases available in the repository. The first one is a root in a container with a total of 408 snapshots available for instances 1 and 2. The second database is from an imported awr dump with 12321 snapshots available from instances 1 until 8.

The next step would be to provide a dbid such as:

awrreport --dbid=607296874 -l system/{password}

which may generate an output like this:

i#  losnap  hisnap  snaps       losnap_end      hisnap_end
-- ------- ------- ------ ---------------- ---------------
 1    6688    6891    204 2022.04.04T20:00 2022.04.13T07:00
 2    6688    6891    204 2022.04.04T20:00 2022.04.13T07:00

To see all available snapshots in some specific time range, you could then do

awrreport --fromtime=2022.04.05T08:00 --totime=2022.04.05T18:00 --dbid 607296874 -l system/{password}


i#     snap    snap_end_time   instance_start
--  ------- ---------------- ----------------
 1     6700 2022.04.05T08:00 2021.12.09T08:25
 1     6701 2022.04.05T09:00 2021.12.09T08:25
 1     6702 2022.04.05T10:00 2021.12.09T08:25
 1     6703 2022.04.05T11:00 2021.12.09T08:25
 1     6704 2022.04.05T12:00 2021.12.09T08:25
  ...
 2     6707 2022.04.05T15:00 2021.12.09T08:31
 2     6708 2022.04.05T16:00 2021.12.09T08:31
 2     6709 2022.04.05T17:00 2021.12.09T08:31
 2     6710 2022.04.05T18:00 2021.12.09T08:31

You can finally create an instance specific awr report as a html file in the /var/www/html/awrs directory by doing something like:

awrreport --output-directory=/var/www/html/awrs --instance=1 --dbid=607296874 -l system/{password} --begin-snap=6702

If the --instance=1 option was not included, a global awr report would have been created.

An example of how to generate an ash report as a text file is:

awrreport --output-text --instance=3 --output-file=ash.txt --dbid 4001460110 -l system/{password} --fromtime=2022.04.02T22:20 -totime=2022.04.02T22:30 --ash-slot-width=30

NOTES

If you are using the full distribution of rwloadsim, awrreport is an executable shell script in the bin directory that calls rwloadsim with the -u option getting awrreport.rwl from the public directory. As a stand alone binary distribution, awrreport is an executable with the awrreport.rwl code embedded.

The name, awreport, was used previously, but the missing ’r’ was causing confusion.

BUG

The ash reports cannot be created globally, i.e. for all instances.

COPYRIGHT

Copyright © 2023 Oracle Corporation
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl

SEE ALSO

rwloadsim(1rwl), ashplot(2rwl), utilities(2rwl), awrdump(2rwl)