HP-UX WLM glance_*(1M) HP-UX WLM glance_*(1M)
NAME
glance_app - GlancePlus APPLICATION class of metric, excluding PRM-spe‐
cific metrics
glance_gbl - GlancePlus GLOBAL class of metric
glance_prm - GlancePlus APPLICATION class of metric, including PRM-spe‐
cific metrics
glance_prm_byvg - GlancePlus PRM BY VOLUME GROUP class of metric
SYNOPSIS
interval] app_metric app_name
interval] gbl_metric
interval] app_prm_metric app_name_prm_groupname
interval] prm_byvg_metric \
prm_byvg_prm_groupname lv_group_name
DESCRIPTION
These commands allow you to access GlancePlus metrics for use with HP-
UX Workload Manager (WLM). Use these commands with the data collector,
described in the wlmrcvdc(1M) manpage, to access the metrics.
The metrics are collected using the glance Adviser (the adviser_only
mode of the interface to GlancePlus, an optional HP product). Refer to
the glance(1) manpage for more information. The GlancePlus product must
be installed in order to access the metrics.
The following table gives an overview of the types of data you can col‐
lect and the methods for transporting that data to HP-UX WLM.
What type of data do you have? Transport method
─────────────────────────────────────────────────────────────────────────
You already track GlancePlus applications you defined glance_app
in your /var/opt/perf/parm file (APP_* metrics)
─────────────────────────────────────────────────────────────────────────
GlancePlus Global metrics (GBL_* metrics) glance_gbl
Table metrics (TBL_* metrics)
─────────────────────────────────────────────────────────────────────────
GlancePlus PRM-specific application metrics glance_prm
(APP_PRM_* and APP_* metrics)
─────────────────────────────────────────────────────────────────────────
GlancePlus PRM By Volume Group metrics glance_prm_byvg
(PRM_BYVG_* metrics)
─────────────────────────────────────────────────────────────────────────
The application is already instrumented glance_tt
with ARM calls
or
You have the application source code and
are going to instrument it with ARM calls
(TT_* metrics)
─────────────────────────────────────────────────────────────────────────
You have a program/script that wlmrcvdc
reports metrics to stdout
─────────────────────────────────────────────────────────────────────────
You have metrics you are collecting wlmsend/wlmrcvdc
outside GlancePlus using a shell script
or perl program
─────────────────────────────────────────────────────────────────────────
You have metrics you are collecting WLM API
outside GlancePlus using a C program
METRICS
A large number of metrics are provided by GlancePlus that are suitable
for use with these commands. You can use these metrics to:
· Measure progress against an SLO's goal in statements
· Enable or disable SLOs based upon condition or statements in
WLM's configuration file
· Assign CPU shares per metric in statements
This manpage describes only a few of the applicable metrics. For a
complete listing of GlancePlus metrics, see the "Performance Metrics"
section in the gpm(1) online help. Note that only metrics with numeric
values are acceptable.
The number of processes that are competing for the CPU resources
in a GlancePlus application group (retrieved using or in
a workload (PRM) group (retrieved using
This metric can be useful in both and statements in your
WLM configuration.
The number of processes that exist in a GlancePlus application
group (retrieved using or in a workload (PRM) group
(retrieved using
This metric can be useful in both and statements in your
WLM configuration.
The number of processes in an application group that completed during
the
interval.
This metric is derived from sampled process data.
Because the data for a process is not available after
the process has died, a process whose life is shorter
than the sampling interval may not be seen when the sam‐
ples are taken. Thus this metric may be slightly less
than the actual value.
The amount of time in the interval.
This metric is useful in normalizing.
The number of CPU resources (cores) physically on the system.
(A core is the actual data-processing engine within a
processor, where a processor might have multiple cores.)
This metric can be useful in both and statements in your
WLM configuration.
The number of users logged in at the time of the interval sample.
This metric can be useful in both and statements in your
WLM configuration.
The average number of "runnable" processes or threads during the
interval.
The amount of time in the interval.
This metric is useful in normalizing.
The number of KBs (or MBs if specified) the PRM group requested to
have read from or written to the logical volumes in the
current volume group during the interval.
Expressions
You can combine numeric metrics and constants in an arithmetic expres‐
sion. Use parentheses for grouping. Some examples, using GLOBAL met‐
rics:
"GBL_CPU_TOTAL_UTIL - GBL_CPU_USER_MODE_UTIL"
"( 100 - GBL_CPU_TOTAL_UTIL ) / 100.0"
When specifying an expression for a metric, enclose the expression in
quotes.
(For information on metrics that are used, but not described, in this
man page, see the file /opt/perf/paperdocs/gp/C/metrics.txt.)
Format
Arithmetic expressions, especially those involving division of integer
quantities, can be formatted to achieve a particular precision, or num‐
ber of decimal places. Otherwise, undesired truncation and/or rounding
may occur. The general format is:
"(expression)|width|decimals"
When providing a format specification with a metric, enclose the entire
sequence in quotes and use parentheses to clearly group any metric
expression being formatted.
glance_app command
interval] app_metric app_name
This command provides data regarding applications as defined by glance
in its /var/opt/perf/parm file. To collect data for applications as
defined by WLM workload group (PRM group), see the section "OpenView
Performance Agent (OVPA) for UNIX" in the wlm(5) man page. Another
option is to see the glance_prm section of this manpage.
Specifies the interval, in seconds, over which data is collected and a
metric value is reported. If not provided, the default
value of 30 is used. (Sets the GlancePlus APP_INTERVAL
to approximately interval.)
app_metric Specifies the metric from the GlancePlus APPLICATION
class, excluding PRM-specific metrics. It can be a sim‐
ple metric name or an expression involving one or more
metrics from GlancePlus's APPLICATION, GLOBAL, or TABLE
classes of metric.
If the expression contains white space, nonalphanumeric
characters, or characters other than underscore (_),
plus (+), minus (-), slash (/), or period (.), enclose
the expression in quotes. The chosen metric must have a
numeric value; string values are not acceptable. A met‐
ric expression can be optionally suffixed with to spec‐
ify fieldwidth and precision. (See the "Expressions"
and "Format" subsections in the "METRICS" section.)
app_name Specifies the target application, as defined in the
/var/opt/perf/parm file. Letter-case is significant.
The special name refers to the group of all processes
that are not part of any defined application. To gather
metrics using you must specify the metric met in an
structure as part of a or statement:
slo slo1{
...
goal = metric met relation goal_value;
...
}
Next, you use with in a statement inside a structure:
tune met {
coll_argv = wlmrcvdc
glance_app app_metric app_name;
}
Refer to the wlmconf(4) manpage for additional information on the WLM
configuration syntax.
The following example illustrates one method of putting a high-priority
SLO into standby-mode during idle periods:
# SLO governing performance of My_App in PRM group app_grp:
slo app_active {
pri = 1;
mincpu = 25;
maxcpu = 50;
entity = PRM group app_grp;
goal = metric app_performance > 75;
condition = metric app_activity;
}
# Reserve fixed allocation for app_grp when My_App is idle.
slo app_idle {
pri = 2;
mincpu = 10;
maxcpu = 10;
entity = PRM group app_grp;
exception = metric app_activity;
}
# Collect performance data for My_App:
tune app_performance {
coll_argv = /opt/app/perfmon;
}
# Provide indication of My_App activity level:
tune app_activity {
coll_argv = wlmrcvdc
glance_app APP_ALIVE_PROC My_App;
}
In the preceding example, /opt/app/perfmon is the name of the exe‐
cutable that delivers performance data for the application. The
app_active SLO is in effect as long as the value of the app_activity
metric is nonzero. The app_activity metric is equivalent to the metric
which indicates the number of alive processes for the My_App applica‐
tion defined in the /var/opt/perf/parm file. When the value of the
app_activity metric drops to zero, the fallback SLO app_idle requests a
reduced minimum share of the CPU resources to satisfy the workload
group while at the same time freeing unused shares for other workload
groups.
This next example demonstrates expression formatting and proper argu‐
ment quoting, as well as normalization to the
tune slo_metric {
coll_argv = wlmrcvdc
glance_app -i 30
"(APP_COMPLETED_PROC / APP_INTERVAL)|8|3"
My_App;
}
Note the use of parentheses around the metric expression.
glance_gbl command
interval] gbl_metric
This command provides metrics that generally apply to the entire sys‐
tem, rather than to a specific application or workload. These metrics
are typically used to enable or disable SLOs based on or statements.
Specifies the interval, in seconds, over which data is collected and a
metric value is reported. If not provided, the default
value of 30 is used. (Sets the GlancePlus GBL_INTERVAL
to approximately interval.)
gbl_metric Specifies the metric from the GlancePlus GLOBAL class.
It can be a simple metric name or an expression involv‐
ing one or more metrics from GlancePlus's GLOBAL or TA‐
BLE classes of metric.
If the expression contains white space, nonalphanumeric
characters, or characters other than underscore (_),
plus (+), minus (-), slash (/), or period (.), enclose
the expression in quotes. The chosen metric must have a
numeric value; string values are not acceptable. A met‐
ric expression can be optionally suffixed with to spec‐
ify fieldwidth and precision. (See the "Expressions"
and "Format" subsections in the "METRICS" section.) To
gather metrics with you must specify the metric met in
an structure as part of a or statement:
slo slo1{
...
condition = metric met;
...
}
Next, you use with in a statement inside a structure:
tune met {
coll_argv = wlmrcvdc
glance_gbl gbl_metric;
}
Refer to wlmconf(4) for additional information on WLM's configuration
syntax.
This next example demonstrates expression formatting and proper argu‐
ment quoting, as well as normalization to the
tune slo_metric {
coll_argv = wlmrcvdc
glance_gbl -i 30
"(GBL_DCE_SERVER_OP / GBL_INTERVAL)|8|3";
}
Note the use of parentheses around the metric expression.
glance_prm command
interval] app_prm_metric app_name_prm_groupname
Specifies the interval, in seconds, over which data is collected and a
metric value is reported. If not provided, the default
value of 30 is used. (Sets the GlancePlus APP_INTERVAL
to approximately interval.)
app_prm_metric Specifies the metric from the GlancePlus APPLICATION
class, including PRM-specific metrics. It can be a sim‐
ple metric name or an expression involving one or more
metrics from GlancePlus's APPLICATION, GLOBAL, or TABLE
classes of metric.
If the expression contains white space, nonalphanumeric
characters, or characters other than underscore (_),
plus (+), minus (-), slash (/), or period (.), enclose
the expression in quotes. The chosen metric must have a
numeric value; string values are not acceptable. A met‐
ric expression can be optionally suffixed with to spec‐
ify fieldwidth and precision. (See the "Expressions"
and "Format" subsections in the "METRICS" section.)
app_name_prm_groupname
Specifies the FSS PRM group to examine. (You cannot
specify a PSET PRM group.) The valid names are defined
by WLM's configuration. (See wlmconf(4).) Letter-case
is significant. If PRM group IDs 0 and 1 are not
explicitly configured, then the special names will be
implicitly defined for those IDs, respectively. (PRM_SYS
appears parenthetically when it is implicitly defined.)
The combined processes in the named PRM group will be
treated as an application for the purpose of data col‐
lection.
If the group you specify has no active SLOs and the key‐
word is set to 1 in your WLM configuration, the group
will be temporarily removed from the WLM configuration
unless it is associated with a process map. When the
group is removed, no new metrics are reported for it.
WLM simply uses the last value it had for the group
repeatedly--until the group returns and a new metric is
supplied to WLM.
Using with WLM in passive mode
Using passive mode, you can ensure your application's processes are
going into the proper workload groups. After that, you can use tools
such as the glance Adviser, or WLM's to measure the workload's utiliza‐
tion. Seeing the resource utilization of an application (and any child
processes it spawns) in passive mode before WLM takes control of
resource allocation can be useful in determining min/max values for the
SLOs used for the application's workload group. Furthermore, it gives
you a utilization baseline to compare active resource management
against, both now and in the future when the application's usage char‐
acteristics may have changed. To gather metrics using you must specify
the metric met in an structure as part of a or statement:
slo slo1{
...
goal = metric met relation goal_value;
...
}
Next, you use with in a statement inside a structure:
tune met {
coll_argv = wlmrcvdc
glance_prm
app_prm_metric app_name_prm_groupname;
}
Refer to wlmconf(4) for additional information on WLM's configuration
syntax.
In the following example, a number of workload groups are defined.
Workload group grpB is reserved for execution instances of a particular
component of a larger application. When these processes run, they
ordinarily occur in high volume batches and have a fixed amount of work
to perform. Both SLOs below pertain to grpB. The ignite SLO grants grpB
some CPU resources when its jobs initially start. Then, after grpB
becomes sufficiently busy (after a certain number of jobs have com‐
pleted in a single MeasureWare interval), the job_pace SLO requests
enough CPU shares for grpB so that each job completes in a given time.
# Workload groups:
# A: application appmain runs in grpA
# B: worker processes spawned by appmain
# C: [further details not pertinent to this example]
# D: [further details not pertinent to this example]
prm {
groups = grpA:2, grpB:3, grpC:4, grpD:5;
apps = grpA:/opt/app/bin/appmain,
grpB:/opt/app/lbin/workproc;
}
# Be sure transient_groups is disabled so that the groups are never
# temporarily removed due to not having any active SLOs
tune {
transient_groups = 0;
}
# When grpB jobs become active, set aside some CPU resources for grpB:
slo ignite {
pri = 10;
mincpu = 25;
maxcpu = 25;
entity = PRM group grpB;
condition = metric job_active_cnt > 0.5;
}
# Once grpB becomes sufficiently busy (more than 10 jobs complete
# in a single glance collection interval), increase max CPU
# request to finish new jobs more quickly
slo job_pace {
pri = 10;
mincpu = 25;
maxcpu = 50;
entity = PRM group grpB;
goal = metric job_time < 7.5;
condition = metric job_finish_cnt > 10;
}
# Collect elapsed (wall clock) time for jobs finishing in grpB:
tune job_time {
coll_argv = wlmrcvdc
glance_prm APP_PROC_RUN_TIME grpB;
}
# Provide count (every 15 seconds) of active jobs running in grpB:
tune job_active_cnt {
coll_argv = wlmrcvdc
glance_prm -i 15 APP_ACTIVE_PROC grpB;
}
# Provide count of jobs that just finished in grpB in
# past 30 seconds:
tune job_finish_cnt {
coll_argv = wlmrcvdc
glance_prm -i 30 APP_COMPLETED_PROC grpB;
}
In the preceding example, the "application" is defined by the workload
group. The metrics report on the processes running in the group. The
metrics report (average) process run time as well as counts of pro‐
cesses running or completing in the interval. The counts are used to
gate the SLOs. When the SLOs are not in effect (because is not satis‐
fied), grpB receives the minimum 1% of the total CPU resources.
The example above conditionally enables SLOs using group-based metrics.
If were set to 1, the groups would be temporarily removed when they
have no active SLOs. (Note, however, that these groups are not removed
if they are associated with a process map.) Furthermore, if a group is
currently removed, cannot provide any metrics for the group, and any
SLOs that depend on those metrics to be enabled cannot be enabled. For
clarity, the example explicitly sets to 0 (the default) to avoid this
situation.
This next example demonstrates expression formatting and proper argu‐
ment quoting, as well as normalization to the
tune slo_metric {
coll_argv = wlmrcvdc
glance_prm -i 30
"(APP_COMPLETED_PROC / APP_INTERVAL)|8|3"
grpX;
}
Note the use of parentheses around the metric expression.
glance_prm_byvg command
interval] prm_byvg_metric \
prm_byvg_prm_groupname lv_group_name
This command provides metrics regarding logical volumes managed by Log‐
ical Volume Manager (LVM) with bandwidth managed by PRM.
Specifies the interval, in seconds, over which data is collected and a
metric value is reported. If not provided, the default
value of 30 is used. (Sets the GlancePlus
PRM_BYVG_INTERVAL to approximately interval.)
prm_byvg_metric
This is the name of the metric from the GlancePlus PRM
BY VOLUME GROUP class. It can be a simple metric name
or an expression involving one or more metrics from
GlancePlus's PRM BY VOLUME GROUP, GLOBAL, or TABLE
classes of metric.
If the expression contains white space, nonalphanumeric
characters, or characters other than underscore (_),
plus (+), minus (-), slash (/), or period (.), enclose
the expression in quotes. The chosen metric must have a
numeric value; string values are not acceptable. A met‐
ric expression can be optionally suffixed with to spec‐
ify fieldwidth and precision. (See the "Expressions"
and "Format" subsections in the "METRICS" section.)
prm_byvg_prm_groupname
Specifies the PRM group using the volume group. The
valid names are defined by WLM's configuration. (See
wlmconf(4).) Letter-case is significant.
lv_group_name Specifies the volume group of interest. It must be con‐
figured for bandwidth management by HP-UX WLM. To
gather metrics using you must specify the metric met in
an structure as part of a or statement:
slo slo1{
...
goal = metric met relation goal_value;
...
}
Next, you use with in a statement inside a structure:
tune met {
coll_argv = wlmrcvdc
glance_prm_byvg prm_byvg_metric
prm_byvg_prm_groupname lv_group_name;
}
Refer to wlmconf(4) for additional information on WLM's configuration
syntax.
The following example illustrates the use of a metric to gate the
enablement of SLOs governing the management of a large, long-running,
compute-intensive job interrupted by occasional I/O phases.
/opt/app/perfmon is the executable that delivers performance data for
the application. The application is managed between when this data
collector reports progress activity. However, when the application is
busy with I/O requests within the specified volume group, the computa‐
tion goal is temporarily suspended, thereby reducing unwarranted SLO
failures. Also, a fixed CPU allocation is requested, potentially bene‐
fiting other workloads during the I/O period.
prm {
groups = grpA:2, grpB:3, grpC:4, grpD:5;
disks = OTHERS: /dev/vg02 1,
grpA: /dev/vg02 45,
grpB: /dev/vg02 15,
grpC: /dev/vg02 35,
grpD: /dev/vg02 4;
}
# Actively manage CPU share for grpA when app is processing,
# EXCEPT during progress checkpoints and dataset loads.
slo app_compute {
pri = 5;
mincpu = 25;
maxcpu = 50;
entity = PRM group grpA;
goal = metric app_rate > 75;
condition = metric app_rate > 1;
exception = metric vg2_req_rate > 200;
}
# During progress checkpoints and dataset loads,
# give grpA some CPU share,
# but set no performance goal for processing.
slo app_chkpnt {
pri = 5;
mincpu = 25;
maxcpu = 25;
entity = PRM group grpA;
condition = metric vg2_req_rate > 200;
}
# Deliver app processing performance rating.
tune app_rate {
coll_argv = /opt/app/perfmon;
}
# Collect metric for volume group I/O request rate.
tune vg2_req_rate {
coll_argv = wlmrcvdc
glance_prm_byvg
"(PRM_BYVG_REQUEST / PRM_BYVG_INTERVAL)|8|2"
grpA /dev/vg02;
}
The example also demonstrates expression formatting and proper argument
quoting. Note the use of parentheses around the metric expression.
Furthermore, it shows normalization to the metric
EXTERNAL INFLUENCES
Environment Variables
The value of if set and not null, will be displayed in certain diagnos‐
tic messages. If it is not set or is null, the word is substituted.
DIAGNOSTICS
These commands will write invalid argument usage and unexpected termi‐
nation error messages on stderr if the terminal is available; otherwise
such error messages will be directed to syslogd (using the facility).
Notification of unexpected death of the glance Adviser will include the
value of if available.
Error messages from the glance Adviser are written on stderr. When
invoked from stderr is directed to /dev/null; hence, these diagnostic
messages are discarded. However, using the tunable in your WLM configu‐
ration, you can redirect stderr to a location of your choosing. (See
"NOTES" for additional troubleshooting tips.)
NOTES
The commands and are sh scripts that reside in the directory
/opt/wlm/lbin/coll/. If problems arise with a command or you would like
to validate your choice of metric before using it in the WLM configura‐
tion, you can invoke the script from a shell prompt and examine the
output. The following lines show how to invoke each of the scripts:
# /opt/wlm/lbin/coll/glance_app -i5 app_metric app_name
# /opt/wlm/lbin/coll/glance_gbl -i5 gbl_metric
# /opt/wlm/lbin/coll/glance_prm -i5 \
app_prm_metric app_name_prm_groupname
# /opt/wlm/lbin/coll/glance_prm_byvg -i5 \
prm_byvg_metric prm_byvg_prm_groupname lv_group_name
While some metrics are normalized, others may be in proportion to
pseudo constants such as These constants are generally static, but it
is possible for them to be changed. Be sure to take this into account
when specifying a metric. For metrics that vary with "constant" val‐
ues, it may be necessary to form an expression that normalizes the met‐
ric. This can be especially important if the interval is ever adjusted
or WLM operates in an environment where system configurations may vary.
For an illustration of normalization, see any of the "Examples of
glance_*" sections above.
WARNINGS
Expressions that may evaluate to a floating-point value should specify
a precision (number of decimal places) to avoid truncation and/or
rounding. This is especially important in cases involving division of
an integer. (See the "Format" subsection in the "METRICS" section.)
glance_app
Specifying an app_name that is undefined normally results in an error.
However, specifying an app_name that differs from a defined application
by letter-case only is not detected, nor does it produce any data. The
specified app_name must match the /var/opt/perf/parm file definition
exactly. This includes matching any trailing white space that may be
present in the parm file's statement of application name.
glance_prm
Specifying an undefined PRM group name does not result in an error, nor
does it produce any data.
If the keyword is set to 1 in your WLM configuration:
· Be aware that any group that is transient will not have any new met‐
rics reported for it if it has no active SLOs and is not associated
with a process map
· Be careful when using any metrics from a transient group in a or
statement
· Metrics, such as may have spikes in their values, or otherwise be
unstable, due to the removal or adding back of the transient group
PRM memory metrics are only available if the memory manager is config‐
ured and enabled.
glance_prm_byvg
Specifying an undefined PRM group name or unmanaged volume group name
does not result in an error, nor does it produce any data.
PRM BY VOLUME GROUP metrics are only available if the volume group disk
bandwidth manager is configured and enabled.
DEPENDENCIES
The commands and all require the optional HP product, GlancePlus.
AUTHOR
and were developed by HP.
FEEDBACK
If you would like to comment on the current WLM functionality or make
suggestions for future releases, please send email to:
wlmfeedback@rsn.hp.com
FILES
The default log file for syslogd's
facility. Check here for possible diag‐
nostics.
Contains definitions of applications.
SEE ALSOglance(1), glance_tt(1M), wlmrcvdc(1M), wlmconf(4), wlm(5), lvm(7)
HP-UX Workload Manager User's Guide (/opt/wlm/share/doc/WLMug.pdf)
HP-UX Workload Manager homepage (http://www.hp.com/go/wlm)
Optional Software Required HP-UX WLM glance_*(1M)