time_url_fetch(1M)time_url_fetch(1M)
ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
NAMEtime_url_fetch - a URL fetch response time WLM data collector based on
the Apache ab tool
SYNOPSIStime_url_fetch [-s] [-i interval] [-n requests] [-c concurrency] [URL]
OPTIONS-s
Fetches the URL a single time and exits. Without -s, time_url_fetch
checks the URL repeatedly, with the frequency determined
by -i interval.
-i interval
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.
-n requests
Number of requests to perform - passed directly to ab
-c concurrency
Number of multiple requests to make - passed directly to ab
The default URL is "http://localhost".
DESCRIPTIONtime_url_fetch is a simple WLM data collector that runs the Apache
/opt/hpws/apache/bin/ab tool every interval seconds and prints the
average time to stdout. The wlmsend tool can then be used to send this
value to wlmd.
Output
The output of time_url_fetch is a column of floating-point numbers,
with a new value released each interval seconds.
Errors
Errors are reported via stderr, and a nonzero exit code. The messages
are written on stderr if the terminal is available; otherwise such
error messages are directed to syslogd (using the daemon facility).
EXAMPLES
Example
Here is an example of driving an HP-UX WLM metric, my_metric, using
time_url_fetch to measure the time required to fetch the URL
http://localhost/cgi-bin/pig.cgi. Note that the smooth utility is then
used to compute a running average of the data to 'smooth' out spikes or
dips.
tune my_metric {
coll_argv = wlmrcvdc
/opt/wlm/lbin/coll/smooth
/opt/wlm/toolkits/apache/bin/time_url_fetch -i 30
"http://localhost/cgi-bin/pig.cgi";
}
RETURN VALUEtime_url_fetch returns exit status 0 if no errors occur, or 1 if
there are errors.
PATH DEPENDENCIES
To be flexible, time_url_fetch will attempt to locate and use ab from
several different apache installations. First, time_url_fetch will
check the setting of APACHE_ROOT in /etc/rc.config.d/hpws_apacheconf if
it exists. If it does not, or there is no setting,
/opt/hpws/apache/bin/ab is used. If that does not exist,
/opt/apache/bin/ab will be used. If that does not exist either, an
error message will be printed.
To use the ab tool from other locations, either set APACHE_ROOT in
/etc/rc.config.d/hpws_apacheconf or create a symbolic link from one of
the ab paths above to your ab tool's location.
AUTHORtime_url_fetch was developed by HP.
FEEDBACK
If you would like to comment on the current WLM Toolkits functionality
or make suggestions for future releases, please send email to:
wlmfeedback@rsn.hp.com
Version information
@(#) HP WLMTK A.01.10.01 (2006_11_05_16_54_54) hpux_ipf
SEE ALSOwlm(5), wlmtk(5), wlmoradc(1M), wlmd(1M), wlmrcvdc(1M), wlmsend(1M)
Using HP-UX Workload Manager with Apache-based Applications
(/opt/wlm/toolkits/apache/doc/apache_wlm_howto.html)
HP-UX Workload Manager Toolkits User's Guide
(/opt/wlm/toolkits/doc/WLMTKug.pdf)
http://www.hp.com/go/wlm
WLMTK updates and information
time_url_fetch(1M)