Sunday, December 31, 2017

New Release and now Open Sourced

VisualAWR has been an interesting project for me while at Oracle.  A great use case was for assessing customer DB workloads for health and capacity planning during Excite 20/20 engagements.  Since moving on to AWS, I see opportunities to use this tool for assessing workload sizing (CPU/Mem/Storage/IOPS) for migration the cloud.  Migration to cloud could mean lift-and-shift to RDS (Oracle flavor) or migration to other relational databases.  Both approaches will need to know historical resource consumption for sizing of infrastructure required to run a database in the cloud, which is where this tool comes in.

I have uploaded a new version which now allows Batch processing of AWRMiner files.  See download option to the right.

I have also opensourced this project on github:  https://github.com/sfurlong/visual-awr

Looking forward to continued collaboration with folks interested in this project.

7 comments:

  1. Hi Stephen,

    I was pointed at your Visual AWR by our Oracle support people. I've attempted a build with Java 8 (1.8.0-241 the Oracle version) as my usual Java 12 doesn't like the sun.*.* stuff at all. Apparently that's now internal and doesn't export the needful.

    When I attempted to run the compiled version that I built, it failed with this error:

    Error: Could not find or load main class org.altaprise.vawr.ui.RootFrame


    I did notice in the run.sh script that CLASSPATH contains "$APP_HOME/lib/vawr-o.jar" but that is not created when I build the source, nor is it included in the download from your dropbox.

    I then downloaded the latest version from your blog link to https://www.dropbox.com/s/xsp8e1g5x9s2cqt/visual-awr-v03a.zip?dl=0

    But that also fails with the same error - I did change my JAVA_HOME to Java 1.8.0-241 in run.sh first of course.

    I'm wondering if Java 8 is too advanced? Do I need an older version. The newer versions certainly won't work due to the sun.*.* stuff.

    Disclaimer: I'm not a Java developer, I'm a DBA, but I can usually find my way around stuff.

    Thanks for this utility, I saw it in action yesterday and it looks great.


    Cheers,
    Norm.



    ReplyDelete
    Replies
    1. Thanks for your interest Norm. Let me answer your question in reverse order, which will hopefully get you started more quickly.
      With regards to downloading the from the dropbox link from my blog, it has been tested with Java8. The dropbox link contains the compiled ".jar" files. As you know, no compilation required for this distro. You will have to edit the run.sh to change the JAVA_HOME environment variable to point to your JDK version.

      I'm using the Amazon JDK now due to Oracle changing their licensing model. Corretto (https://aws.amazon.com/corretto/) is a true OpenJDK opensource jdk distro. AWS runs on it, so rock solid.
      So step are:
      1. Download the visual-awr distro from drop box
      2. Install your Java8 JDK or find where it is on your machine
      3. Modify the JAVA_HOME line on your run.sh to reflect the location of your JDK. Also make sure the PATH variable is not commented out
      4. Make the run.sh executable using the command "chmod +x run.sh"
      5. To run from command line use: "./run.sh"

      I have included a copy of my run.sh that I just tested with below.

      Let me know how this goes. reply back and I'll walk you through doing a build, if you still want to recompile.
      Also, feel free to reach out with feedback and feature requests. Interested in hearing about desired new requirements. Good Luck!


      #!/bin/bash
      APP_HOME=.; export APP_HOME
      JAVA_HOME=/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home; export JAVA_HOME
      JAVA_OPTS="-Xms64M -Xmx512M"
      #JAVA_OPTS=$JAVA_OPTS -DDEBUG
      export JAVA_OPTS

      CLASSPATH=
      CLASSPATH=$APP_HOME/lib/jcommon-1.0.22.jar:$CLASSPATH
      CLASSPATH=$APP_HOME/lib/jfreechart-1.0.17.jar:$CLASSPATH
      CLASSPATH=$APP_HOME/lib/vawr.jar:$CLASSPATH
      CLASSPATH=$APP_HOME/lib/vawr-o.jar:$CLASSPATH
      CLASSPATH=$APP_HOME/lib/vawr-utils.jar:$CLASSPATH
      CLASSPATH=$APP_HOME/lib/ojdbc5.jar:$CLASSPATH
      export CLASSPATH

      echo $JAVA_HOME

      PATH=$JAVA_HOME/bin:$PATH

      java $JAVA_OPTS -DAPP_HOME=$APP_HOME org.altaprise.vawr.ui.RootFrame

      Delete
  2. Good Morning Stephen,

    many thanks indeed for a very prompt reply. I have good news and bad news for you...

    I can confirm that the problem was at my end. It appears that visualawr will not run in a git bash "Linux" session on Windows 10. Sorry for the noise. I have it running fine using the Windows run.bat file and Java 8. My apologies again.

    I have also got it to work in Windows 10 with Java 12 - I've sent you a pull request of github for the fix. It's just to replace the "sun" stuff with new names as Oracle have removed their visibility at Java 9 I am informed.

    That's the good news. The bad news is that it's not at all happy reading Oracle 12.2 AWR HTML files, nor is it happy reading the AWR data directly from the database.

    With AWR files, I get a summary chart, but there's no detail in any of the information. For example the database name is empty and the numeric fields are 0. Whatever metric I try to chart, I get told that there's no data for that metric.


    When reading from the database, I get a valid login (as a DBA enabled user) and there are no errors getting the DBID, the Snapshots and even when I Query the data.

    However, if I try to export the dataset - I get told "No AWR records found. Do query first". If I attempt a report/chart, I get told that there's no data.

    Having said that, it does work perfectly on Oracle 11.2.0.4.

    I might trace the 12c session to see what it's doing.

    Anyway, thanks again.


    Cheers,
    Norm.

    ReplyDelete
  3. Hey Norm, I'm going to test on 12c. A couple of comments based on your notes...the instructions could sure use an update. I'll use this opportunity to update. So let's try this:
    Instead of connecting directly to the 12c DB, let's try to run the awr_miner.sql script that is in the /lib directory of the application. The SQL script formats the data in AWRMiner format so it can be ingested by the app feature: "AWR from AWRMiner file". If this script won't produce a file, I should be able to debug once my 12c is done installing. If the script produces a file, but won't generate graphs, then send let's figure out a way for you to privately send me the AWSMiner file produced by the sql script. BTW the /testing directory older generated AWRMiner files.

    As far as direct connect to the DB, I can test that out once my DB gets installed.

    Good Luck!

    ReplyDelete
    Replies
    1. Hey Norm, one more update. I did connect directly to a 12c DB hosted on AWS (vs 12.2.0.1.ru-2020-01.rur-2020-01.r1 to be exact) and I was able to connect OK and after establishing the connection parms on the "Setup" tab of the visualAWR app. I then used the "AWR Direct from DB" tab. Make sure you select the Start Snapshot ID and End Stapshot ID (just use the first snapshot Id from Start and last snapshot ID for Ending), click Next. On this screen choose Query AWR Data. This step should populate some metrics in the greyed-out text box below. Then hit next again, Select your desired metric and press Chart Metric. Wish I could post screen shots in these messages, would make much more sense. Give it a try and Good Luck!

      Delete
  4. Hi Stephen,

    I wonder if my 12c problem is one of pluggable versuse container databases? I connected to the pluggable when maybe I should be in the container. I'll try that next week when I'm in the office again. I did, however, go through all the steps, choosing DBIDs and snapshot start and finish etc. Pressing the query button didn't fill in the greyed out text box as it does quite happily when connected to an 11G database.

    I will also give the awrminer script a try out next week as well.

    Have a great weekend (when it comes!)


    Cheers,
    Norm.

    ReplyDelete
    Replies
    1. Ahh, good points on the pluggable vs container database. Not sure what I used as I was connected to an RDS Oracle 12c instance on AWS. RDS is a managed service, so some of the details are hidden from me. Keep me posted on this.

      Cheers Norm!

      Delete