HP-UX Workload Manager Toolkits User's Guide

HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM
How do I use the metrics?
Chapter 2 51
For example, an SLO can be built to control the allocation for a particular
application. However, there is no point to give the application any
allocation if it is not running. The GlancePlus toolkit’s
APP_ACTIVE_PROC metric, explained in glance_app(1M), could be used
as a condition to the application’s SLO so that it is only active when
glance Adviser sees an active process in the application’s group.
The wlmoradc utility can be used in a similar fashion to enable or disable
SLOs based on values available from inside an Oracle instance. Items
from the instance V$ tables are particularly useful for this purpose, as
they provide administrative information to the DBA in much the same
way that GlancePlus or OpenView metrics provide information to an
HP-UX system administrator. For more information on the V$ tables, see
your Oracle documentation.
For instance, if we’d like WLM to give 20 shares to instance
‘blue_suede_shoes’ whenever we see the Oracle user ELVIS connected to
the database instance, a SQL statement like the following would count
the matching connections:
select count(*) from V$SESSION where username = ’ELVIS’;
An SLO/metric combination like the following would manage the
allocation:
slo blue_slo {
pri = 1;
cpushares = 20 total;
entity = PRM group blue_group;
condition = metric elvis_user_cnt > 0;
}
tune elvis_user_cnt {
coll_argv =
wlmrcvdc
wlmoradc
--sqlstring ”select count(*) from V$SESSION where username = ’ELVIS’;”
;
}
Example files in the toolkit with conditions or exceptions are:
/opt/wlm/toolkits/oracle/config/batchuser_boost.wlm
/opt/wlm/toolkits/oracle/config/manual_payroll_boost.wlm
/opt/wlm/toolkits/oracle/config/user_cnt_boost.wlm