presman – Oracle Resource Manager Monitor

I’ve been working a lot with DBRM lately and the worst thing is feeling that we can’t properly measure our plan directives and how effective our DBRM plans are in real world.
I’ve decided to learn more about Python so i did a try in writing a tool to monitor my DBRM complex implementations and plans.

presman is a small tool, that works with Python >2.6 and cx_Oracle. It was tested on Linux and MacOSX Yosemite (10.10.x). It works on your favorite terminal and no more is needed.

As soon as you install Python (if needed) and cx_Oracle you are ready to go. Please remember that for MacOSx you have to build cx_Oracle. I will provide detailed instructions on how to build it in near future.

Some of the features are:

1) Measure your CPU usage and Session I/O by Consumer Group;
2) Show real time table and bar chart with a configurable refresh time;
3) Export measured data to a CSV to easy manipulate;
4) Configuration is easy and straightforward.

Before run it, check the configuration file config.ini that contains a few options:


– Available options are cpu and session_io. Default is cpu;
– Refresh rate is the rate for screen refresh. Minimum allowed is 3 seconds;
– The connection should be made using an Oracle user that is allowed to query DBA_ and V$ views from DBRM. SYSTEM is recommended.

To run it you have two different options. The second option is to output the measured on chart to a CSV:
– For cpu option the output is the % of CPU Usage by Consumer Group;
– For session_io option the output is the % of Consumed I/O (Small and Large Read and Write I/O) by Consumer Group.

lcarapinha@Luiss-MacBook-Pro:~/$./ output_plan.csv

Here is the first screenshot of presman in action using cpu option. Please note that in the top of the image you have several information regarding your database.
The table shows several information about CPU Usage by Consumer Group, for example the number of yields, active session or requests.
As you can see, it allows you to measure with your defined refresh rate how DBRM is allocating the CPU resource and check if that really matches with your implementation.

presman shot

The next screenshot will show presman in action using session_io option. This option allows us to check I/O consumed by Consumer Group. DBRM is not able to “limit” your I/O but you can measure the distribution of the I/O by Consumer Group and how your DBRM plan can influence that.


If you opt to output the measured values (see what is saved in top of this post) to a file, you can use the CSV to create fancy graphics like this one (with refresh rate 10 seconds):


The same applies to session_io option:


Please make note of the following restrictions on 1.0 version:
– No RAC support (yet)
– Not tested in Windows platform

I will release it soon in a new “page” in the blog as i have one “performance” bug fixed when presman runs for several hours and need to output to file.
For now code is available in github here: