当你遇到性能问题时,可以通过收集下面的信息来帮助诊断性能的问题。除了这些,还有比如sosreport,ashv等。下面摘自Note2303303.1
(1) Collect the following diagnostics from the database which experience performance issues.
Collect a TFA for the affected database for the timeline of the issue.Login as root on one of the DB nodes and run:
# tfactl diagcollect -database <DB Name> -awrhtml -os -sundiag -from "MMM/dd/yyyy hh:mm:ss" -to "MMM/dd/yyyy hh:mm:ss"
Eg:
# tfactl diagcollect -database dbm01 -awrhtml -os -sundiag -from "Aug/21/2017 11:00:00" -to "Aug/21/2017 15:00:00" (We recommend to specify the "from time" to be 4 hours before and the "to time" to be 4 hours after the time of the incident).
Note: -awrhtml and -os options would collect the 1 hr interval AWR reports and the Exawatcher data for the given timeline respectively.
If the performance issues started after a change in the environment, it would be good to collect the AWR reports prior to the change as well, for the comparison.
SQL> @?/rdbms/admin/awrrpt.sql
specify the snapshot interval, when the performance was good.
(2) Collect the following diagnostics from each of the storage cells.
Sundiag
Login to the cell as root and run:
# /opt/oracle.SupportTools/sundiag.sh
Cell metrics history data covering the timeline of the issue.
Login as root to the database node 01 and run:
# dcli --serial -g ~/cell_group -l root "cellcli -e list metrichistory where objectType like \'FLASHCACHE\|CELLDISK\|IORM_DATABASE\|FLASHLOG\|SMARTIO\|IORM_CATEGORY\|IORM_CONSUMER_GROUP\' and collectionTime \> \'2017-08-01T11:00:00-04:00\' and collectionTime \< \'2017-08-01T15:00:00-04:00\'" > cell_metric_history.txt
Alternatively, we can run the below command to collect the cell metric data from the
Login as root to each of the storage cells.
# cellcli -e list metrichistory where objectType like 'FLASHCACHE|CELLDISK|IORM_DATABASE|FLASHLOG|SMARTIO|IORM_CATEGORY|IORM_CONSUMER_GROUP' and collectionTime > '2017-08-01T11:00:00-04:00' and collectionTime < '2017-08-01T15:00:00-04:00' > cell_metric_history.txt
Note: Please modify the collection start and end time to match with the TFA collection Exawatcher data .
# opt/oracle.ExaWatcher/GetExaWatcherResults.sh --from MM/DD/YYYY_HH24:MI:SS --to MM/DD/YYYY_HH24:MI:SS
Eg:
# opt/oracle.ExaWatcher/GetExaWatcherResults.sh --from 08/01/2017_12:00:00 --to 08/01/2017_20:00:00
Note: Please modify the collection start and end time to match with the TFA collection