W-ASH : Web Enabled ASH

October 31st, 2011

I’m excited about the ease of creating rich user applications  that are web enabled  given the state of technology now. JavaScript and JQuery have gone from being disdained as “not a very serious” language to moving towards the limelight of front and center.

Here is a small example.

Download the following file:  W-ASH (web enabled ASH, file is wash.tar.gz )

Source is also on github at https://github.com/khailey/wash

Go to your apache web server root, in my case on redhat Linux is

# cd /usr/local/apache2
# gzip -d wash.tar.gz
# tar xvf wash.tar
-rwxr-xr-x  21956  14:08:21 cash.sh
-rw-r--r--  30881  11:52:10 htdocs/ash.html
drwxr-xr-x      0  15:40:52 htdocs/js/
-rwxr-xr-x  10958  14:04:42 cgi-bin/json_ash.sh

(the directory htdocs/js has a number of files put into it from Highcharts. I edited them out to make the output cleaner)

There are 3 basic files

  1. cash.sh  – collect ASH like data from Oracle into a flat file, it  runs in a continual loop
  2. ash.html  – basic web page using Highcharts
  3. json_ash.sh – cgi to read ASH like data and give it to the web page via JSON

Now you are almost ready to go. You just need to start the data collection with “cash.sh”  (collect ASH)

Usage: usage <username> <password> <host> [sid] [port]

The script “cash.sh” requires “sqlplus” be in the path and that is all. It’s probably easiest to

  • move/copy cash.sh to an ORACLE_HOME/bin
  • su oracle
  • kick it off as in:
nohup cash.sh system change_on_install orcl &

The script “cash.sh” will create a directory in /tmp/MONITOR/day_of_the_week for each day of the week, clearing out any old files, so there are only maximum 7 days of data. (to stop the  collection run “rm /tmp/MONITOR/clean/*end” )

To view the data go to your web server address and add “ash.html?q=machine:sid
For example my web server is on
The database I am monitoring is on host with Oracle SID “orcl”


See video at : http://screencast.com/t/sZrFxZkTrmn


  1. Trackbacks

  2. No trackbacks yet.

  2. Hemesh
    November 5th, 2011 at 20:53 | #1

    I have tried your script,

    But it not display data on web browser, its just display ash.html page.

    Even though I got data in
    [oracle@localhost:fwlive]$ cat\:fwlive\:ash.dat

    Are you able to help me in this case.


  3. November 5th, 2011 at 21:27 | #2

    You can look at the raw data with the cgi script.
    For example, my ash page is
    if I replace “ash.html” with “cgi-bin/json_ash.sh” as in
    I will get the browser page full of json data as in:


    can you try this out an send me the output?

  4. Libor Vejpustek
    November 21st, 2011 at 10:52 | #3

    I try W-ASH and I have empty page too.
    Is not W-ASH only for Enterprise edition with Diagnostic Pack ?
    I have Standart edition only.
    json_ash : {“Administrative”:[0,0,0][4999,0],,”Application”:[0,0,0][4999,0],,”Cluster”:[0,0,0][4999,0],,”Commit”:[0,0,0][4999,0],,”Concurrency”:[0,0,0][4999,0],,”Configuration”:[0,0,0][4999,0],,”Network”:[0,0,0][4999,0],,”Other”:[0,0,0][4999,0],,”Queueing”:[0,0,0][4999,0],,”Scheduler”:[0,0,0][4999,0],,”System_I/O”:[0,0,0][4999,0],,”User_I/O”:[0,0,0][4999,0],,”CPU”:[0,0,0][4999,0],,”evtnames”:[],”evt_adm”:[],”evt_app”:[],”evt_clu”:[],”evt_com”:[],”evt_cnc”:[],”evt_cnf”:[],”evt_net”:[],”evt_oth”:[],”evt_que”:[],”evt_sch”:[],”evt_sio”:[],”evt_uio”:[],”evt_cpu”:[],”sqlnames”:[],”sql_adm”:[],”sql_app”:[],”sql_clu”:[],”sql_com”:[],”sql_cnc”:[],”sql_cnf”:[],”sql_net”:[],”sql_oth”:[],”sql_que”:[],”sql_sch”:[],”sql_sio”:[],”sql_uio”:[],”sql_cpu”:[],”sesnames”:[],”ses_adm”:[],”ses_app”:[],”ses_clu”:[],”ses_com”:[],”ses_cnc”:[],”ses_cnf”:[],”ses_net”:[],”ses_oth”:[],”ses_que”:[],”ses_sch”:[],”ses_sio”:[],”ses_uio”:[],”ses_cpu”:[]}

  5. January 9th, 2012 at 22:05 | #4

    @Hemesh, @Libor
    To look at the CGI output, I left out a parameter. The syntax is
    for example, original URL is
    and to see the CGI output is
    you can also run the cgi at the command prompt as in
    ash.sh 60 host:SID
    in my case this would be
    ash.sh 60

  6. David Mann
    November 18th, 2012 at 13:51 | #5

    Very cool, great looking and useful output and the footprint is minimal. I have been trying to build some tools for myself that are as close to cross platform as possible, right now I am using Java/Play Framework in dev mode as a lightweight app server but will have to check out these techniques at least for my *nix setups.

You must be logged in to post a comment.