If you are using Oracle Enterprise Manager and ASM, then you may already be familiar with the following page that displays the Disk Group Usage per database for a particular Disk Group:
But if you are not using Oracle Enterprise Manager, then you may find this post useful.
I created a R script “graph_asm_dg_usage.r ” (You can download it from this repository) that provides:
- A graph similar to the OEM one.
- A pdf file that contains the graph.
- A text file that contains the values used to build the graph.
The graph is available from both outputs (X11 and the pdf file). In case the X11 environment does not work, the pdf file is generated anyway.
Let’s launch it to see the result:
./graph_asm_dg_usage.r Building the thin jdbc connection string.... host ?: bdt_host port ?: 1521 service_name for ASM ?: +ASM sys as sysasm password ?: dontreadthis Display which disk group (no quotation marks, no +) ?: ARCHIVE Loading required package: methods Loading required package: DBI Loading required package: rJava Please enter any key to exit:
The output is the following:
As you can see you are prompted for:
- jdbc thin “like” details to connect to the ASM instance (You can launch the R script outside the host hosting the ASM instance).
- oracle sys user password.
- The ASM disk group you want to focus on.
- It has been tested on a 220.127.116.11 asm instance.
- If you want to install R, you should begin to read “Getting Starting” from this link.