In my earlier post, I talked about, how tableau can be used to visualize the data. In some cases, I find it useful to query AWR base tables directly using Python and graph it using matplotlib package quickly. Since python is preinstalled in almost all computers, I think, this method will be useful for almost everyone. Of course, you may not have all necessary packages installed in your computer, you can install the packages using install python packages . Of course, if you improve the script, please send it to me, I will share it in this blog entry.
Script is available as a zip file: plotdb.py
Usage:
Script usage is straight forward. Unzip the zip file and you will have a .py script in the current directory. Execute the script (after adjusting permissions of the script) using the format described below:
# To graph the events for the past 60 days, for inst_id=1, connecting to PROD, with username system. ./plotdb.py -d PROD -u system -n 'latch free' -t e -i 1 # To graph the statistics for the past 60 days, for inst_id=2, connecting to PROD ./plotdb.py -d PRD -u system -n 'physical reads' -t s -i 2
A typical graph from the above script is: