ASM datafiles size…in bubbles

I’ve started a few days ago learning R and i’ve done some cool things on it (not that cool, really), mainly generating various type of charts with random data collected from Streams performance and my preferred is Bubble Chart.

To exemplify i’ve created a simple R script to generated bubbles from my ASM datafile size. My twitter friend Bertrand Drouvot R scripts helped me to create the JDBC connection.

cat ("Building the thin jdbc connection string....\n")
cat ("\n")

# which host ?

cat("host ?: ")
srv_host_name<-readLines(con="stdin", 1)

# which port ?

cat("port ?: ")
srv_port<-readLines(con="stdin", 1)

# which service_name ?

cat("service_name ?: ")
srv_name<-readLines(con="stdin", 1)

# system password ?

cat("system password ?: ")
system_pwd<-readLines(con="stdin", 1)

# set up a JDBC connection
# configure "drv" for your env

drv <-JDBC("oracle.jdbc.driver.OracleDriver","/Volumes/DATA/oracle_client/ojdbc6.jar")



myquery<-"SELECT ANAME, round(f.bytes/1024/1024, 2) FSIZE FROM v$asm_file f, v$asm_alias a WHERE f.group_number=a.group_number and f.file_number=a.file_number and f.type='DATAFILE' ORDER BY 1, 2"


radius <- sqrt(data$FSIZE/ pi)
symbols(data$FSIZE, data$FSIZE, circles=radius, inches=0.35,
        main = "ASM file size bubbles",
        fg="white", bg="red", xlab="Size", ylab="Size")
text(x=data$FSIZE, y=data$FSIZE, labels=data$ANAME, cex=0.5)

The result from this very simple example is:

ASM datafile size bubble chart


Hope it can be useful for you too.

One thought on “ASM datafiles size…in bubbles

  1. Pingback: SLOB2: Testing The Effect Of Oracle Blocksize | flashdba

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s