HP-UX Workload Manager User's Guide

Advanced WLM usage: Using performance metrics
Supplying data to WLM
Appendix H 485
Because they are started by a daemon process (wlmd), stream collectors
do not have a stderr on which to communicate errors. However, WLM
provides the coll_stderr tunable that allows you to log each collector’s
stderr. In addition, a stream data collector can communicate using either
syslog(3C) or logger(1) with the daemon facility.
To configure a stream collector for a metric called metricSC, place the
following tune structure in your configuration file:
tune metricSC {
coll_argv = wlmrcvdc collector_path collector_args ;
}
The sg_pkg_active data collector is an example of a stream collector, as
are several of the Toolkit data collectors, including time_url_fetch
(ApacheTK) and wlmwlsdc (WebLogicTK).
Native collectors Native collectors use the WLM API to communicate
directly with the WLM daemon. For information on the WLM API, see
“Sending data from a collector written in C” on page 499.
Like stream collectors, these collectors are started by WLM when
activating a configuration. WLM expects them to continue to run and
provide metrics until notified of a WLM shutdown or restart. For tips on
writing your own data collectors, see the white paper at
/opt/wlm/share/doc/howto/perfmon.html.
This type of collector is appropriate if the desired metric values are
obtained through calls to a C or C++ language API that is provided by
the source of the metric. One example of such an API is the pstat(2)
family of system calls used to obtain process statistics.
This type of collector establishes a direct connection with WLM using the
WLM API function wlm_mon_attach(). Then, executed in a loop, the
collector calls the API functions necessary to obtain the metric value,
followed by a call to the WLM API function wlm_mon_write() to pass the
value on.
Because they are started by a daemon process (wlmd), native collectors’
output to stdout and stderr is discarded. However, WLM provides the
coll_stderr tunable that allows you to log each collector’s stderr. In
addition, a native data collector can communicate using either syslog(3C)
or logger(1) with the daemon facility.
To configure a native collector for a metric called metricNC, place the
following tune structure in your configuration file: