HP-UX Workload Manager User's Guide
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Appendix H500
• Develop a program that writes its data to stdout and use it with
wlmrcvdc
For information on this approach, see “Sending data via stdout” on
page 499.
• Use the WLM API
This section discusses the API.
NOTE You can also write a program that invokes the wlmsend command.
However, if you are writing a program, it is recommended that you use
wlmrcvdc to capture stdout or you use the API.
For information on how to set up your WLM configuration to receive this
data, see Table H-2 on page 494.
This API includes three functions. The function prototypes and return
codes are defined in the following include file:
/opt/wlm/include/wlm.h
The three C functions are:
• wlm_mon_attach()
Opens communication to the WLM daemon.
• wlm_mon_write()
Writes data to the WLM daemon.
• wlm_mon_detach()
Closes communication to the WLM daemon.
The compile line for a program using these functions is:
% cc -I/opt/wlm/include -L/opt/wlm/lib -lwlm [ flag ... ]
file ...
NOTE The stdout and stderr for each data collector that WLM starts are
discarded. However, WLM provides the coll_stderr tunable that allows
you to log each collector’s stderr. In addition, data collectors can
communicate using either syslog(3C) or logger(1) with the daemon
facility.