HP-UX Workload Manager Toolkits User’s Guide Version A.01.10.01 Manufacturing Part Number: T1302-90040 January 2007 © Copyright 2001-2007 Hewlett-Packard Development Company, L.P.
Publication history Eleventh edition January 2007 T1302-90040 HP-UX 11i v3 Tenth edition September 2006 T1302-90036 HP-UX 11i v1, HP-UX 11i v2, HP-UX 11i v3 Ninth edition March 2006 T1302-90032 HP-UX 11i v1, HP-UX 11i v2 Eight edition May 2005 T1302-90028 HP-UX 11i v1, HP-UX 11i v2 Seventh edition March 2004 T1302-90022 HP-UX 11.0, HP-UX 11i v1, HP-UX 11i v2 Sixth edition March 2004 T1302-90019 HP-UX 11.
Second edition October 2001 T1302-90004 HP-UX 11.0, HP-UX 11i First edition March 2001 T1302-90001 HP-UX 11.
Notice Copyright 2001-2007 Hewlett-Packard Development Company, L.P. All Rights Reserved. Reproduction, adaptation, or translation without prior written permission is prohibited, except as allowed under the copyright laws. The information contained in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software.
Contents 1. HP-UX Workload Manager Overview What is HP-UX Workload Manager? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What are these toolkits? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where do I get WLMTK? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Feedback to the development team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Potential password visibility/file tampering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Potential perl code issue in the configuration file. . . . . . . . . . . . . . . . . . . . . . . . . . . . Potential SQL code issue using --sqlfile file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Error and informational messages . . . . . . . .
Contents Potential password visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 posix_sh_setup_file issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Related information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5. HP-UX WLM SAP Toolkit Supported installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Command and macro reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . wlmdurdc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . hp_wlmtk_goals_report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Frequently asked questions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tables Table 2-1. ODBTK directories and files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 Table 2-2. WLM example configuration files described . . . . . . . . . . . . . . . . . . . . . . . .35 Table 2-3. wlmoradc example configuration files described. . . . . . . . . . . . . . . . . . . . .37 Table 3-1. ApacheTK directories and files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 Table 4-1. WebLogicTK directories and files. . . . . . . . . . . . . . . . .
Tables 12
Figures Figure 2-1. Overview of how the database metrics are used . . . . . . . . . . . . . . . . . . . .27 Figure 6-1. Unrelated applications without duration management . . . . . . . . . . . . .105 Figure 6-2. Unrelated applications with duration management. . . . . . . . . . . . . . . .106 Figure 6-3. Overview of how applications can be managed . . . . . . . . . . . . . . . . . . . .109 Figure 6-4. Overview of how SAS jobs can be managed. . . . . . . . . . . . . . . . . . . . . . .
Figures 14
HP-UX Workload Manager Overview What is HP-UX Workload Manager? 1 HP-UX Workload Manager Overview This chapter provides an overview of the HP-UX Workload Manager product and its supporting toolkits. What is HP-UX Workload Manager? HP-UX Workload Manager (WLM) is a virtualization solution that helps you achieve a true Adaptive Enterprise.
HP-UX Workload Manager Overview What is HP-UX Workload Manager? a workload. WLM is most effective managing applications that are CPU-bound. It adjusts the CPU allocation of a workload based on current needs and performance of that workload’s applications. HP-UX WLM manages workloads based on parameters defined within a configuration file. You define one or more SLOs for each workload, and you can prioritize the SLOs so that an SLO assigned a higher priority is given precedence over lower-priority SLOs.
HP-UX Workload Manager Overview What are these toolkits? What are these toolkits? The HP-UX Workload Manager Toolkits (WLMTK) are a collection of toolkits that simplify: • Getting metrics on Oracle database instances into WLM • Managing Apache-based workloads • Managing WebLogic Server workloads • Collecting SAP processes based on user-defined criteria and assigning them to specific workload groups • Managing the duration of workloads • Getting metrics from an SNMP agent For information on thes
HP-UX Workload Manager Overview Where do I get WLMTK? Where do I get WLMTK? The WLM Toolkits are installed at: /opt/wlm/toolkits/ If WLMTK is not already installed on your system, you can download it free of charge from the following Web site: http://www.hp.com/go/wlm Feedback to the development team If you would like to comment on the current functionality or make suggestions for future releases, please send email to: wlmfeedback@rsn.hp.
HP-UX Workload Manager Overview Training http://www.hp.com/education/courses/u5447s.
HP-UX Workload Manager Overview Training 20 Chapter 1
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM 2 HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM The HP-UX Workload Manager Oracle Database Toolkit is a collection of utilities that simplify getting metrics on Oracle database instances into HP-UX Workload Manager, also known as HP-UX WLM. WLM enables you to place Oracle instances and other applications in their own WLM workload groups.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Supported installations These tools were designed with the following goals in mind: • Simplify getting the data to answer the question: “When does my Oracle instance need more CPU resources to meet business objectives?” Toward this end, the tools provide a simple method for getting the following metrics to WLM: — Wallclock time consumed by a piece of SQL code (the amount of time it takes for the SQL code to execute) — A single floating-po
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Supported installations Unsupported combinations Oracle8i includes Database Resource Manager. When used with WLM, Database Resource Manager can produce unexpected results in terms of resource allocation and user-access priorities—however, there are no data integrity issues. Nevertheless, HP recommends that you not use Database Resource Manager and HP-UX Workload Manager on the same system at the same time.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Audience for the ODBTK documentation Audience for the ODBTK documentation This documentation is intended for database administrators and system administrators who are charged with consolidating or managing multiple applications, including database instances, onto a single server, while ensuring that performance levels are maintained.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Tools in WLM Oracle Database Toolkit (ODBTK) Tools in WLM Oracle Database Toolkit (ODBTK) This toolkit includes two tools: wlmoradc The wlmoradc tool is a data collector for HP-UX Workload Manager and is designed to provide an easy building block for Oracle instance management with wlmd(1M).
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM What metrics are available? Although not part of ODBTK, the functionality provided by the cpushares keyword in the WLM configuration file fits quite nicely with the toolkit. cpushares keyword in WLM configuration file The cpushares keyword allows shares-per-metric allocations. This enables you to create goal-based SLOs in WLM of the form “x CPU shares for each metric y.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Overview of how the metrics work with WLM Overview of how the metrics work with WLM Figure 2-1 illustrates how the ODBTK works with your databases to get metrics to WLM. First, the toolkit utility wlmoradc uses SQL statements to interact with the database through SQL*Plus to get the database metrics.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Where do I get ODBTK? Where do I get ODBTK? ODBTK is installed at: /opt/wlm/toolkits/oracle/ If it is not already installed on your system, download it free of charge from the following Web site: http://www.hp.com/go/wlm What comes with ODBTK? ODBTK comes with two utilities (wlmoradc and smooth), their manpages, and a number of example configuration files. Table 2-1 lists many of the included files.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Where do I get ODBTK? Table 2-1 ODBTK directories and files (Continued) Directory/file Description /opt/wlm/toolkits/oracle/bin/smooth Utility for computing a running average, which is useful for smoothing out extreme values in data /opt/wlm/toolkits/oracle/config/alpha_shares_per_user.wl m Example configuration file* /opt/wlm/toolkits/oracle/config/batchuser_boost.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Where do I get ODBTK? * For descriptions of the example configuration files, see Table 2-2 on page 35 and Table 2-3 on page 37. How do I install ODBTK? Use the SD-UX swinstall command to install ODBTK, which is part of the WLM Toolkits product (product number WLMToolkits).
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Where do I get ODBTK? hp_wlmuser is not allowed to create any tables. To create the user and role, connect to each instance with SQL*Plus to execute create_hp_wlmuser.sql, as shown below. NOTE Be sure to run create_hp_wlmuser.sql against each instance for which you want to use hp_wlmuser, setting $ORACLE_HOME appropriately. $ whoami oracle $ ORACLE_HOME=/oracle/app/oracle/product/8.1.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Where do I get ODBTK? Grant succeeded. USERNAME ACCOUNT_STATUS CREATED ------------------------------ -------------------------------- --------HP_WLMUSER OPEN 14-MAR-01 SQL> Disconnected from Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production With the Partitioning and Java options PL/SQL Release 8.1.5.0.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Where do I get ODBTK? For an overview of the example wlmoradc configuration files, see Table 2-3 on page 37.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? How do I use the metrics? To use the Oracle database metrics: 1. Determine a useful example WLM configuration file. 2. Customize the WLM configuration file. 3. (Optional) Customize an example wlmoradc configuration file. 4. Check the WLM configuration file’s syntax with wlmd -c. 5. Activate the WLM configuration file with wlmd -a.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? Step 1. Determine a useful example WLM configuration file. Example configurations are available in /opt/wlm/toolkits/oracle/config/. Choose a file that provides metrics matching the type you need. Table 2-2 describes the available example files. Table 2-2 WLM example configuration files described WLM configuration file Purpose alpha_shares_per_user.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? Step 2. Customize the appropriate WLM configuration file. a. Determine whether metrics will be collected internal or external to the configuration file. To decide this issue, see the section “Implementing metrics as a system administrator vs. as a DBA” on page 38. b. Copy the WLM configuration files from the directory /opt/wlm/toolkits/oracle/config/ to the local directory. These files have a “.wlm” extension.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? g. Create an application record in the prm structure in the configuration file for each instance by modifying the existing application records. For example, consider this line from /opt/wlm/toolkits/oracle/config/manual_payroll_boost.wlm: apps = Ora_grp_1:/oracle/app/oracle/product/8.1.5/bin/oracle "ora*instance1", Here, you would change the oracle path to match the $ORACLE_HOME setting for the instance.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? Table 2-3 wlmoradc example configuration files described (Continued) wlmoradc configuration file user_cnt.oradc Purpose Report number of users connected to an instance For information on the syntax of the wlmoradc configuration files, see wlmoradc(1M). Use these configuration files from their current location via the --configfile option to wlmoradc.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? Commands specified only in the WLM configuration file Specifying commands in the WLM configuration file is ideal for a DBA who also serves as a system administrator, as this method requires root privileges. With root privileges, the system administrator can conveniently edit the configuration file to collect the necessary metrics.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? For example, from /opt/wlm/toolkits/oracle/config/manual_payroll_boost.wlm, the metric oracle.instance1.payroll_running is monitored because of the following tune structure: tune oracle.instance1.payroll_running { coll_argv = wlmrcvdc ; } This structure sets up a mechanism using wlmrcvdc that takes metric values and feeds them into HP-UX WLM.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? You can set up these commands to be triggered: • By cron on a regular interval • Manually when the SLO needs to be met • From inside SQL or via the HOST or ‘!’ commands How do I customize an example WLM configuration file? To illustrate how to customize a WLM configuration file, consider the file /opt/wlm/toolkits/oracle/config/shares_per_user.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? # prm structure # Define three workload groups. The first two groups are for # Oracle instances. The third group, called long_batch, is for # other work being done on the server. # # The ‘apps’ definitions place the applications in workload # groups. Note that the two Oracle instances each have a # Pro*C-based application: /workload1/oltp1 and /workload2/oltp2.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? # Have HP-UX WLM give workload ora2_grp three CPU shares for each user # connected to the associated Oracle instance. See the tune structure below # for details on how the user counts are collected. # slo ora2_slo { pri = 2; mincpu = 5; maxcpu = 90; entity = PRM group ora2_grp; cpushares = 3 total per metric oracle.instance2.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? # Determine the number of number of connected users for instance1 and # pass the metric on to wlmd. # tune oracle.instance1.user_cnt { coll_argv = wlmrcvdc wlmoradc --configfile /opt/wlm/toolkits/oracle/config/user_cnt.oradc --home /oracle/app/oracle/product/8.1.5 --instance instance1 ; } # # Determine the number of number of connected users for instance2 and # pass the metric on to wlmd. # tune oracle.instance2.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? • # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # A Pro*C-based application, zeus_app, is used with instance beta, so it has an application record that places it in the workload group beta_grp. Name: alpha_shares_per_user.wlm Version information: (C) Copyright 2000-2005, Hewlett-Packard Development Company, L.P. $Revision: 1.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? # prm structure # Create workload groups and designate which binaries and Oracle # instances will be placed in each. Alpha, beta, and gamma all # get their own group, while larry, moe, and curly are placed in # the group named static_instances. # # The alpha, beta, and gamma instances are all Oracle 8.1.5 based, # and share an ORACLE_HOME setting, while larry, moe, and curly # are 8.0.6 based.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? # Have HP-UX WLM give alpha_grp three CPU shares for each user. # slo alpha_slo { pri = 1; mincpu = 20; maxcpu = 70; entity = PRM group alpha_grp; cpushares = 3 total per metric oracle.alpha.user_cnt; } # # Have HP-UX WLM give beta_grp three CPU shares for each user. # slo beta_slo { pri = 1; mincpu = 20; maxcpu = 70; entity = PRM group beta_grp; cpushares = 3 total per metric oracle.beta.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? # # # # # Any CPU that remains after satisfying the above SLOs is given to the OTHERS group by default. You can change this default using the distribute_excess keyword. For more information on this keyword, see the wlmconf(4) manpage. # # Set the basic interval on which wlmd allocation changes # are made to 30 seconds. For optimal performance with Oracle, do not use # an interval of less than 10 seconds.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? # Duplicate the setup for beta -- count beta instance user connections # and send to wlmd via wlmrcvdc. # tune oracle.beta.user_cnt { coll_argv = wlmrcvdc wlmoradc --configfile /opt/wlm/toolkits/oracle/config/user_cnt.oradc --home /u01/app/oracle/product/8.1.5 --instance beta ; } # # Duplicate the setup for gamma -- count gamma instance user connections # and send to wlmd via wlmrcvdc. # tune oracle.gamma.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? In the WLM configuration file, instances are separated using the apps keyword. In the example below, from /opt/wlm/toolkits/oracle/config/batchuser_boost.wlm, there are four workload groups. Processes for the instance named instance1, which are presumably of the form ora*instance1, are placed in the workload group Ora_grp_1. Similarly, instance2 processes are placed in Ora_grp_2. NOTE Starting with WLM A.03.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? 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.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? Executing a query to get an SQL value In this section, the configuration has an SLO that increases the workload’s CPU resources as the number of active connections (or users) increases. To implement this configuration: Step 1. Copy the shares_per_user.wlm file to your local directory and rename it: # cp /opt/wlm/toolkits/oracle/config/shares_per_user.wlm \ ./my_shares_per_user.wlm Step 2.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? Step 7. Once you have a feel for how the components work together, modify the my_shares_per_user.wlm file to perform the SQL queries needed in your environment. For additional example configuration files that you can modify to better fit your needs, see the files ending in “.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? To implement your own time-based goals from SQL statements: Step 1. Identify SQL statements that perform the transaction to be timed. Step 2. Try the SQL statements manually using SQL*Plus. NOTE Oracle is very efficient at caching data. When you are getting a walltime by hand for a baseline, run the query twice using the option --iterations=2 to wlmoradc.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? b. Invoke wlmoradc. In the tune structure below, wlmoradc uses the times.oradc file to track the time for the transaction for the instance named instance1. The result is forwarded to HP-UX WLM by wlmrcvdc. tune O1_transaction01_time { coll_argv = wlmrcvdc wlmoradc --configfile times.oradc --instance instance1 ; } Step 6.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? Step 5. Invoke wlmoradc on the command line: # wlmoradc --configfile my_user_cnt.oradc If there are problems, add the option --debug 2 to see the SQL input and output and determine the causes: # wlmoradc --configfile my_user_cnt.oradc --debug 2 Step 6. In your WLM configuration file: a. Specify your SLO, as shown in this shares-per-process example.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? Step 8. Activate the WLM configuration file: # wlmd -a configfile Specifying a desired metric level (goal-based) Rather than worrying about the amount of CPU resources an instance gets per metric, you can specify a desired goal for the metric. Using a goal statement in the WLM configuration, you indicate the current value of the metric (obtained from wlmoradc) and your desired goal for the metric.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? Time-driven goals An important element of goal-based workload management is a time-driven goal: WLM determines the correct CPU allocation so that some action is performed in n seconds. This action could be a transaction for an instance doing OLTP, a query that is run frequently, or any unit of work with a completion time that can be used as a proxy to gauge the overall performance of the instance.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM How do I use the metrics? • The proxy transaction is of significant duration. The wlmoradc tool uses an SQL*Plus timer that has, at most, resolution of hundredths of seconds. However, proxy transactions of less than approximately 0.2 seconds may experience instability, especially if the overall volume of transactions is low.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Command reference Command reference ODBTK consists of two utilities: • wlmoradc • smooth These utilities are described below. wlmoradc The wlmoradc tool is a data collector for HP-UX Workload Manager. It provides an easy building block for Oracle instance management with wlmd(1M).
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM What about security issues? The smooth tool takes a stream of newline-delimited numbers and outputs a stream of numbers that are a running average of the last n values, where n is a value that can be set on the command line. The principal use for the smooth utility is to remove short spikes or dips in data collector output used with WLM, but it can be used with any stream of floating-point numbers.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM What about security issues? Potential perl code issue in the configuration file The wlmoradc configuration file is a perl file. It is specified through the wlmoradc command-line option --configfile file. This file is executed, so if it contains malicious commands, your system could be at risk. Be careful what commands are specified, and set the UNIX file permissions appropriately for the configuration file.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Troubleshooting Troubleshooting This section explains how to view error and informational messages. In addition, it discusses debugging techniques, as well as common errors and how to fix them. Error and informational messages Messages are provided on stderr and through syslog. • stderr You can redirect stderr with the wlmoradc option --stderrfile file Alternatively, you can use the coll_stderr keyword in your WLM configuration.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Troubleshooting smooth: nonnumeric value ... Run the tool with the option --debug to see what values are being fed into it by the data collector (either wlmoradc or a user-supplied collector). Then fix wlmoradc or the user-supplied collector feeding the invalid input to smooth.
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Related information wlmoradc: bad SQL code in sqlfile or sqlstring Use SQL*Plus manually to check syntax and functionality, then use the file or string with wlmoradc. wlmoradc: missing environment variables Run wlmoradc using wlmd, but include the options --debug 2 --stderrfile /tmp/test to see the complete environment. Make sure the wlmoradc command line has the correct options, including -h oracle_home (--home oracle_home).
HP-UX WLM Oracle Database Toolkit: Providing Database Metrics to WLM Related information • HP-UX Workload Manager — wlm(5) — wlmd(1M) — wlmconf(4) — wlmrcvdc(1M) — White paper on writing data collectors (also known as “performance monitors”) /opt/wlm/share/doc/howto/perfmon.html — HP-UX Workload Manager User’s Guide: http://docs.hp.com/hpux/netsys /opt/wlm/share/doc/WLMug.pdf — Workload Management homepage: http://www.hp.
HP-UX WLM Apache Toolkit (ApacheTK) 3 HP-UX WLM Apache Toolkit (ApacheTK) The Apache web server is a very popular front end for a number of different web-based systems. The basic Apache process, httpd, and other processes it starts and manages comprise much of the workload for many middle tier systems in the enterprise, including many resource-intensive workloads. Beyond commercial packages, much of the emerging web services infrastructure is being built around Apache or Apache-managed workloads.
HP-UX WLM Apache Toolkit (ApacheTK) Supported installations Supported installations A large component of ApacheTK is the white paper Using HP-UX Workload Manager with Apache, which illustrates how to manage a variety of Apache-based workloads. This white paper was written using the following packages: • HP-UX Workload Manager (WLM) Version A.02.02 (B8843CA) However, you can use WLM Version A.01.01 or later in most circumstances to accomplish the management outlined in the paper.
HP-UX WLM Apache Toolkit (ApacheTK) Tools in ApacheTK Tools in ApacheTK This toolkit includes the following tools: Using HP-UX Workload Manager with Apache This white paper provides examples showing how to manage various Apache-based workloads. time_url_fetch time_url_fetch is a data collector for Workload Manager. This collector uses the Apache benchmark tool ab to time URL response times. wlm_watch.cgi wlm_watch.
HP-UX WLM Apache Toolkit (ApacheTK) Where do I get ApacheTK? What comes with ApacheTK? ApacheTK comes with the white paper, the time_url_fetch and wlm_watch.cgi tools, the associated manpages, and a number of example configuration files. Table 3-1 lists many of the included files. Table 3-1 ApacheTK directories and files Directory/file Description /opt/wlm/share/man/man5.Z/wlmtk.
HP-UX WLM Apache Toolkit (ApacheTK) Where do I get ApacheTK? Table 3-1 ApacheTK directories and files (Continued) Directory/file Description /opt/wlm/toolkits/apache/config/apache_vs_batch.wlm Example WLM configuration file* /opt/wlm/toolkits/apache/config/apache_vs_single_cgi.wlm Example WLM configuration file* /opt/wlm/toolkits/apache/config/apache_vs_tomcat.wlm Example WLM configuration file* /opt/wlm/toolkits/apache/config/apache1_servlet_vs_apache2_ssl.
HP-UX WLM Apache Toolkit (ApacheTK) How do I use ApacheTK? How do I install ApacheTK? Use the SD-UX swinstall command to install ApacheTK, which is part of the WLM Toolkits product (product number WLMToolkits).
HP-UX WLM Apache Toolkit (ApacheTK) Example WLM and Apache configurations Example WLM and Apache configurations ApacheTK provides many WLM and Apache configurations in the /opt/wlm/toolkits/apache/config/ directory. These configurations are: • apache_vs_oradb.wlm WLM configuration file to demonstrate separating an Oracle database instance workload from httpd and its children. • apache_vs_batch.wlm WLM configuration file to demonstrate separating a batch job workload from httpd and its children.
HP-UX WLM Apache Toolkit (ApacheTK) Command reference • apache_resptimes.wlm WLM configuration to support managing an Apache instance by URL fetch response time. The previous configuration descriptions are based on Revision 1.12 of the file /opt/wlm/toolkits/apache/config/README. Command reference ApacheTK consists of the time_url_fetch data collector and the wlm_watch.cgi CGI script. time_url_fetch time_url_fetch is a data collector for Workload Manager. It is specified in the WLM configuration file.
HP-UX WLM Apache Toolkit (ApacheTK) Related information Related information For information about ApacheTK and its related products, consult the following documentation: • Workload Manager Apache Toolkit — Using HP-UX Workload Manager with Apache-based Applications white paper /opt/wlm/toolkits/apache/doc/apache_wlm_howto.html — time_url_fetch(1M) — wlm_watch(1M) — wlmtk(5) (Workload Manager Toolkits overview) — Workload Manager Toolkits A.01.10.
HP-UX WLM Apache Toolkit (ApacheTK) Related information 76 Chapter 3
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Supported installations 4 HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) WLM can help you manage and prioritize BEA WebLogic Server workloads. Supported installations A large component of WebLogicTK is the white paper Using HP-UX Workload Manager with BEA WebLogic. This paper illustrates how to manage a variety of WebLogic workloads. This white paper was written using the following packages: • HP-UX WLM Version A.02.02 on HP-UX 11i v1 (B.11.
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Why use WLM with BEA WebLogic? As indicated above, WLM and WebLogicTK control CPU allocation to individual WebLogic instances. However, the latest version of the paper Using HP-UX Workload Manager with BEA WebLogic expands the methods for controlling instances to control WebLogic Server clusters.
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Tools in WebLogicTK Tools in WebLogicTK This toolkit includes the following tools: Using HP-UX Workload Manager with BEA WebLogic This white paper, in the file weblogic_wlm_howto.html in the directory /opt/wlm/toolkits/weblogic/doc/, provides examples showing how to manage various WebLogic workloads. wlmwlsdc wlmwlsdc is a data collector for Workload Manager. This collector tracks metrics created to gauge how busy an instance is.
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Where do I get WebLogicTK? Where do I get WebLogicTK? WebLogicTK is installed at: /opt/wlm/toolkits/weblogic/ If it is not already installed on your system, you can download it free of charge from: http://www.hp.com/go/wlm What comes with WebLogicTK? WebLogicTK comes with the white paper, the wlmwlsdc and expsmooth tools, the associated manpages, a number of example configuration files, and properties files used by wlmwlsdc.
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Where do I get WebLogicTK? Table 4-1 WebLogicTK directories and files (Continued) Directory/file Description /opt/wlm/toolkits/weblogic/bin/wlmwlsdc The WLM data collector, which provides data to WLM /opt/wlm/toolkits/weblogic/bin/expsmooth The data smoothing utility /opt/wlm/toolkits/weblogic/config/manual_cpucount.wlm Example WLM configuration file* /opt/wlm/toolkits/weblogic/config/wls_1inst_3level.
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Where do I get WebLogicTK? Table 4-1 WebLogicTK directories and files (Continued) Directory/file Description /opt/wlm/toolkits/weblogic/config/instA_qdepth.props Example WLM properties file for wlmwlsdc* /opt/wlm/toolkits/weblogic/config/instA_qdepth_hipri.props Example WLM properties file for wlmwlsdc* /opt/wlm/toolkits/weblogic/config/instB_qbusy.props Example WLM properties file for wlmwlsdc* /opt/wlm/toolkits/weblogic/config/instB_qdepth.
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) How do I use WebLogicTK? How do I use WebLogicTK? The best way to use WebLogicTK is to read the white paper Using HP-UX Workload Manager with BEA WebLogic Server available from: • http://www.hp.com/go/wlm • /opt/wlm/toolkits/weblogic/doc/weblogic_wlm_howto.html The paper guides you through the steps and tools needed to use WLM with WebLogic.
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Example WLM configurations and properties files • wls_2inst_3level.wlm WLM configuration file to demonstrate how to control two WebLogic instances and monitor the execution queue of each to determine if it is idle (normal allocation), busy (boost of one additional core), or very busy (boost of two additional cores). • wls_1inst_CPUusage.wlm WLM configuration file to demonstrate how to control a single WebLogic instance versus other workloads.
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Example WLM configurations and properties files • wls_1inst_hybrid_qc.wlm WLM configuration file to demonstrate how to control a WebLogic instance. The WebLogic instance’s workload group is allocated from one to four cores, which wlmd allocates using a pair of SLOs: a CPU usage SLO similar to the wls_2inst_CPUusage.wlm example, and a queue metric based goal similar to the wls_2inst_q_goal.wlm example.
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Command reference • instB_qdepth.props wlmwlsdc properties file with example properties showing how to fetch the queue_depth metric from WebLogic instance ‘instB’. • instA_qdepth_hipri.props wlmwlsdc properties file with example properties showing how to fetch the queue_depth metric from WebLogic instance ‘instA’ high priority queue (named ‘hipri’).
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) What about security issues? expsmooth NOTE As of WLM A.02.02, it is recommended that you use the cntl_smooth WLM keyword instead of the expsmooth tool. For information on cntl_smooth, see wlmconf(4). expsmooth is a utility that smooths data (giving more importance to more recent data), softening spikes in the data, for consumption by WLM. expsmooth uses /opt/perl/bin/perl. For more information on setting up and using this utility, see expsmooth(1M).
HP-UX WLM BEA WebLogic Server Toolkit (WebLogicTK) Related information Related information For information about WebLogicTK and its related products, consult the following documentation: • Workload Manager BEA WebLogic Server Toolkit — Using HP-UX Workload Manager with BEA WebLogic /opt/wlm/toolkits/weblogic/doc/weblogic_wlm_howto.html — wlmwlsdc(1M) — expsmooth(1M) — wlmtk(5) (Workload Manager Toolkits overview) — Workload Manager Toolkits A.01.10.
HP-UX WLM SAP Toolkit Supported installations 5 HP-UX WLM SAP Toolkit In conjunction with HP Serviceguard Extension for SAP (SGeSAP), WLM provides integration with the SAP applications through the WLM SAP Toolkit (SAPTK). This toolkit is part of the freely available WLM Toolkits, or WLMTK. SAP has several different types of processes such as dialog (interactive), batch, update, and spool processes. Each type of process might have greater importance at unique times of the month.
HP-UX WLM SAP Toolkit Audience for the SAPTK documentation • HP-UX WLM Version A.03.01 on HP-UX 11i v1 (B.11.11) and HP-UX 11i v2 (B.11.23) Audience for the SAPTK documentation This SAPTK information is intended for anyone implementing WLM and would like to manage SAP processes. Why use SAPTK? SAPTK allows easy isolation and separation of SAP workloads. You can use WLM to prioritize and assign specific SAP processes to workload groups.
HP-UX WLM SAP Toolkit Where do I get SAPTK? Where do I get SAPTK? SAPTK is installed at: /opt/wlm/toolkits/sap/ If it is not already installed on your system, you can download it free of charge from the following Web site: http://www.hp.com/go/wlm What comes with SAPTK? SAPTK Table 5-1comes with the wlmsapmap utility, its manpage, and an example configuration file. Table 5-1 lists many of the included files. Table 5-1 SAPTK directories and files Directory/file Description /opt/wlm/share/man/man5.
HP-UX WLM SAP Toolkit How do I use SAPTK? * For descriptions of the example configuration files, see “Example WLM configuration files” on page 93. How do I install SAPTK? Use the SD-UX swinstall command to install SAPTK, which is part of the WLM Toolkits product (product number WLMToolkits).
HP-UX WLM SAP Toolkit Example WLM configuration files Example WLM configuration files This section includes the example configuration files included in the following location: /opt/wlm/toolkits/sap/config/ File for isolating an entire SAP system into different workloads The following configuration file, isolate_sap.wlm, demonstrates how WLM can isolate SAP workloads and allocate CPU resources based on workload usage. This configuration file isolates an entire SAP system by using a single user record.
HP-UX WLM SAP Toolkit Example WLM configuration files # allocations to 5 seconds. (The default interval is 60 seconds. Using a # smaller interval allows WLM to respond more quickly to changes in # workload performance.) # # Use absolute_cpu_units mode so that 100 shares equals 1 core of CPU # resources. # tune { wlm_interval = 5; absolute_cpu_units = 1; } # # prm structure # #Define groups for the various workloads.
HP-UX WLM SAP Toolkit Example WLM configuration files pri = 1; entity = PRM group SAP; mincpu = 100; maxcpu = 300; goal = usage _CPU; } File for separating entire SAP instances into different workloads This example configuration file, split_inst.wlm, demonstrates how WLM can collect SAP instances within the same SAP system and separate them into different workload groups, using WLM's process map (procmap) feature. WLM allocates CPU resources based on workload usage. # # Name: #split_inst.
HP-UX WLM SAP Toolkit Example WLM configuration files # # Set the interval on which WLM takes CPU requests and makes changes in CPU # allocations to 5 seconds. (The default interval is 60 seconds. Using a # smaller interval allows WLM to respond more quickly to changes in # workload performance.) # # Use absolute_cpu_units mode so that 100 shares equals 1 core of CPU # resources. # tune { wlm_interval = 5; absolute_cpu_units = 1; } # # prm structure # #Define groups for the various workloads.
HP-UX WLM SAP Toolkit Example WLM configuration files goal = usage _CPU; } # # The following SLO requests resources on behalf of the SAP_D02 workload. # This SLO is usage-based, so more CPU resources will get allocated as # the workload gets busier. # slo s_SAP_D02 { pri = 1; entity = PRM group SAP_D02; mincpu = 100; maxcpu = 300; goal = usage _CPU; } File for separating SAP processes into different workloads This example configuration file, split_procs.
HP-UX WLM SAP Toolkit Example WLM configuration files #into different workload groups. # # Dependencies: #This example was designed to run with HP-UX WLM version A.03.01 or #later. # # Set the interval on which WLM takes CPU requests and makes changes in CPU # allocations to 5 seconds. (The default interval is 60 seconds. Using a # smaller interval allows WLM to respond more quickly to changes in # workload performance.) # # Use absolute_cpu_units mode so that 100 shares equals 1 core of CPU # resources.
HP-UX WLM SAP Toolkit Command reference -f /etc/cmcluster/C11/wlmprocmap.C11_D01_node1 -t BTC, Dialog : /opt/wlm/toolkits/sap/bin/wlmsapmap -f /etc/cmcluster/C11/wlmprocmap.C11_D01_node1 -t DIA; } # # The following SLO requests resources on behalf of the Batch workload. # This SLO is usage-based, so more CPU resources will get allocated as the # workload gets busier.
HP-UX WLM SAP Toolkit Related information wlmsapmap The wlmsapmap tool collects SAP processes (by PIDs) for WLM. It is specified in the WLM configuration file. The WLM daemon wlmd invokes wlmsapmap at startup. For more information on this utility—including its options, see wlmsapmap(1M). Related information If you would like to learn more about SAPTK, see: • wlmtk(5) • wlmsapmap(1M) • HP-UX Workload Manager Toolkits A.01.10.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software 6 HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software NOTE The HP-UX WLM Duration Management toolkit (DMTK), including its wlmdurdc command, and the HP-UX WLM Toolkit for Base SAS Software (SASTK), will be deprecated in a future release. However, a new and improved SASTK will be made available and will include a white paper and example configuration files.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Supported installations NOTE The functionality described below that pertains to SAS is actually from the HP-UX WLM Toolkit for Base SAS Software (SASTK). However, as SASTK is tightly coupled with DMTK, they are discussed together. Supported installations DMTK works with: • HP-UX WLM Version A.03.02 on HP-UX 11i v1 (B.11.11), HP-UX 11i v2 (B.11.23), and HP-UX 11i v3 (B.11.31) • HP-UX WLM Version A.03.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Audience for the DMTK / SASTK documentation Audience for the DMTK / SASTK documentation This information is for anyone in need of duration management for long-running jobs or examples illustrating express lanes. Also, this documentation is for integrators, administrators, and developers working with Base SAS software in an environment where certain performance levels must be maintained.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Why use DMTK / SASTK with WLM? Why use DMTK / SASTK with WLM? The benefits of using DMTK / SASTK with WLM are the: • Examples that show how express lanes can be used to quickly complete urgent jobs • Ability to define goals for job duration so that jobs get just the right amount of CPU resources—not too much or too little—to finish within user-specified time ranges For examples showing how to set up these types management
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Why use DMTK / SASTK with WLM? Figure 6-1 shows three unrelated applications—App1, App2, and App3—sharing a server without the benefit of duration management. The applications most critical to the business, App1 and App2, run continuously and tend to consume about 20% and 50% of the CPU resources, respectively.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Why use DMTK / SASTK with WLM? In Figure 6-2, we have the same three applications—App1, App2, and App3. This time, however, duration management is used. App3 is started earlier in the day—with duration management ensuring it still finishes by 6 am. With duration management in effect, App3 now consumes about 30% of the CPU resources. Consequently, App1 and App2 are able to user their typical 20% and 50% of the CPU resources.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Tools in DMTK / SASTK Tools in DMTK / SASTK DMTK and SASTK include the following items for duration management: wlmdurdc The wlmdurdc tool is a duration data collector for Workload Manager.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Overview of how WLM’s duration management works Overview of how WLM’s duration management works Before you can manage duration, you need profile values for your applications. These values represent the CPU time needed by your application to complete. You can get these values as explained in “Completing an application within a certain duration (duration management)” on page 114.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Overview of how WLM’s duration management works Figure 6-3 Overview of how applications can be managed User-supplied File of profile values Discovery command WLM component (Identifies the application) Duration workload group (Includes the application) PID, Profile value, Desired duration (seconds) Pr o ces e sm tr ic s Adjusted CPU allocation wlmdurdc Controlling metric HP-UX WLM Figure 6-4 shows how duration
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Overview of how WLM’s duration management works Figure 6-4 Overview of how SAS jobs can be managed User-supplied File of profile values Discovery command WLM component (Identifies the SAS job) Duration workload group (Includes the SAS job) PID, Profile value, Desired duration (seconds) ic s e tr m e te e s s o m p l jo b c o c AS Pr e nt om S c r Pe f o f r in Adjusted CPU allocation wlmdurdc Controlling metric HP-
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Where do I get DMTK / SASTK? Where do I get DMTK / SASTK? DMTK is installed at /opt/wlm/toolkits/duration/. SASTK is installed at: /opt/wlm/toolkits/sas/ If these toolkits are not already installed on your system, you can download them free of charge from the following Web site: http://www.hp.com/go/wlm.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Where do I get DMTK / SASTK? Table 6-1 DMTK/SASTK directories and files (Continued) Directory/file Description /opt/wlm/toolkits/duration/config/README Readme for the WLM Duration Management Toolkit example configurations /opt/wlm/toolkits/duration/config/duration.wlm Example configuration file /opt/wlm/toolkits/duration/config/expressconf.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Where do I get DMTK / SASTK? How do I install DMTK / SASTK? Use the SD-UX swinstall command to install DMTK / SASTK, which are both part of the WLM Toolkits product (product number WLMToolkits).
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? How do I use DMTK / SASTK? This section gives step-by-step procedures and examples for: • Completing an application within a certain duration (duration management) • Completing an urgent job as quickly as possible (express lanes) Completing an application within a certain duration (duration management) Duration management allows you to control the duration of a process by managing its CPU alloca
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? Many applications’ discovery commands can be simple shell scripts. Example discovery commands are included with DMTK and SASTK. NOTE If your target application is started by a script, be sure that your discovery command looks for the executable rather than the script that starts it. When first setting up a discovery command, just focus on getting the target application’s PID to standard out.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? Step 3. Define SLOs for each group Moving to the slo structure in the WLM configuration file, we define goals for each of the target applications. With duration management, the goal is always to have the metric from wlmdurdc be greater than 0.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? To see all the configuration file fragments from the previous steps together, see “Example WLM configuration file for duration management from steps above” on page 119. Step 5. Check the syntax of the configuration file # wlmd -c configfile and fix any errors found in the syntax check Step 6. Start WLM # wlmd -a configfile Step 7.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? For other applications, implement the reporting represented by the following pseudo-code, either inside the application or as an external utility: PID=process_id # Get the application’s PID # wlmdurdc creates this file and checks it for data file=/var/opt/wlm/tk_config/wlmdurdc.met.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? Example WLM configuration file for duration management from steps above This first configuration brings together all the configuration file fragments from the section “Completing an application within a certain duration (duration management)” on page 114.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? Example WLM configuration file for duration management The following configuration is from: /opt/wlm/toolkits/duration/config/duration.wlm It shows how to use the example discovery command (/opt/wlm/toolkits/duration/examples/duration.sh) given in the section “Example discovery command” on page 123. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Name: duration.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? #---------------------------------------------------------------------------# # prm structure # Create workload groups. We will be actively managing one workload, # duration_1, and leaving the rest of the CPU resources to the # workload group OTHERS. # # Also, we need a method for getting the SAS development group’s # special processes into the duration_1 group.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? tune duration_1_procs_active { coll_argv = wlmrcvdc glance_prm -i 2 APP_ACTIVE_PROC duration_1; } # # # # # # Configure wlmdurdc to launch the example discovery script (/opt/wlm/toolkits/duration/examples/duration.sh). The duration.sh script takes two arguments: a workload group name (duration_1) and a file (dur_1_rate) containing application names, profile values, and desired durations.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? Example discovery command The discovery command invoked in the previous section is given below. Note that this example is merely a starting point; there are more sophisticated ways to collect this information. Also be aware that there are example discovery commands specifically for SAS users in: /opt/wlm/toolkits/sas/examples/ In essence, this script: 1.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? # # # # # # # # # # # # # # # # Example discovery script for wlmdurdc. This script is launched by wlmdurdc to discover a process that is to be managed. It returns a PID, the profile value in CPU seconds, and the desired duration in seconds. This script could be used when multiple process will be run in the same workload group at different times. The * * * output of duration.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? if [ ! -e “$JOB_CONFIG_FILE” ]; then echo “ERROR: $JOB_CONFIG_FILE does not exist. echo “before this script can be used.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? set -A entry_fields `cat ${JOB_CONFIG_FILE} | \ awk -v active_entry=${active_procs[i]} \ ‘$1~active_entry {print $0}’` # Get the actual PID of the process pid=`ps -R ${PRM_GROUP} | \ awk -v target=${active_procs[i]} \ ‘$NF~target {print $1}’` # Send the PID, profile value, and desired duration for the # application: echo “${pid} ${entry_fields[1]} ${entry_fields[2]}” # We’ve done the job exit 0 fi l
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? Instrumenting SAS jobs for better duration management DMTK comes with the macro hp_wlmtk_goals_report. Use this macro to instrument your SAS jobs for more precise duration management. Place the macro throughout the source code to report “percent complete” to the HP-UX Workload Manager duration management data collector wlmdurdc.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? From this, we know that the 5th invocation (Tag: 5) of hp_wlmtk_goals_report in the SAS job running with PID 20179 claims that the job is 79% complete. If the job is not actually 79% at this point, adjust the value in the hp_wlmtk_goals_report invocation. Example instrumentation The following example code fragment shows how to insert hp_wlmtk_goals_report calls into your SAS job.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? WLM allows you to create an express lane for quicker completion of your most critical jobs. These jobs may run on a regular schedule or on an as-needed basis. Nevertheless, through the use of a specially defined WLM workload group for these jobs, you can be sure the jobs execute quickly.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? To create an express lane group and run a job in it: Step 1. Add an express lane workload group to your current WLM configuration.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? Step 5. Activate the configuration: # wlmd -a configfile Step 6. Start the high-priority job in the express_lane workload group: # prmrun -g express_lane critical_job where critical_job is a command for launching the job. You can also move an existing high-priority job to the express_lane workload group.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? # A WLM workload group is needed to handle special queries from the # marketing department. These special requests are very important # and must be completed as quickly as possible without regard to # the impact on other services. From past experience, just running # these special processes in a workload group containing a fixed # allocation gives the best response characteristics.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? # express_lane workload group with the prmrun command: # # % prmrun -g express_lane # users = jdoe : express_lane, +marketing_netgroup : express_lane; # Line is commented out because the undefined user and netgroup # would result in an error if this file were checked by wlmd.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? Example express lane: shares-per-metric allocation This example (/opt/wlm/toolkits/duration/config/expressconf_shares.wlm) creates an express lane that receives more CPU resources with each process that is active in the workload group. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Name: expressconf_shares.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? # Dependencies: # This example was designed to run with HP-UX WLM version A.01.02 or # later. It uses the cpushares keyword introduced in A.01.02, so # is incompatible with earlier versions of WLM. # #---------------------------------------------------------------------------# # prm structure # Create workload groups.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? # # # # # Use a tune structure with glance_prm to determine the number of active processes in the express_lane group. This structure generates the metric express_lane_procs_active, which is used to make the SLO below inactive when no processes are present in the express_lane workload group.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? Example express lane: CPU utilization goal The last example (/opt/wlm/toolkits/duration/config/expressconf_usage.wlm) shows an express lane based on an SLO with a CPU usage, or utilization, 7goal. Recall that a usage goal tries to keep the workload’s CPU utilization of its allocated CPU resources within a certain range—by changing the amount of CPU resources allocated.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? #---------------------------------------------------------------------------# # prm structure # Create workload groups. We will be actively managing one workload, # express_lane, and leaving the rest of the CPU resources to workload # group OTHERS. # # Also, we need a method for getting marketing’s special processes # into the express_lane group.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software How do I use DMTK / SASTK? # # # # Use a tune structure with glance_prm to determine the number of active processes in the express_lane group. This tune structure generates the metric express_lane_procs_active, which is used to make the SLO below inactive when no processes are present in the express_lane workload group.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Command and macro reference Command and macro reference DMTK / SASTK consist of: • wlmdurdc duration data collector • hp_wlmtk_goals_report SAS macro These item are described below. wlmdurdc The wlmdurdc tool is a data collector for Workload Manager. It provides duration management for wlmd(1M).
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Command and macro reference The wlmdurdc tool works as described below: Step 1. Launches discovery commands The wlmdurdc tool launches all the discovery commands using exec(). Step 2. Gets discovery data wlmdurdc waits for each discovery command to output data. Step 3. Locates target application The wlmdurdc tool locates the process matching the PID from the discovery command output.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Frequently asked questions Frequently asked questions Following are various questions that may occur in using DMTK / SASTK. I want a process to finish in five minutes. How do I set that up? Your discovery command feeds three values into wlmdurdc: a process PID, a profile value for that process, and a desired duration. You want to set the desired duration value to five minutes. This value must be in seconds, so set it to 300.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Related information Related information For information about DMTK, SASTK, and their related products, consult the following documentation: • DMTK / SASTK — wlmdurdc(1M) — hp_wlmtk_goals_report(1M) — wlmtk(5) (Workload Manager Toolkits overview) — HP-UX Workload Manager Toolkits A.01.10.
HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software Related information 144 Chapter 6
HP-UX WLM SNMP Toolkit Supported installations 7 HP-UX WLM SNMP Toolkit WLM provides integration with the HP-UX SNMP agent and other SNMP agents through the WLM SNMP Toolkit (SNMPTK). This toolkit is part of the freely available WLM Toolkits, or WLMTK. SNMPTK provides a WLM data collector called snmpdc, which fetches values from an SNMP agent so you can use them as metrics in your WLM configuration. For more information on WLM, see the HP-UX Workload Manager User’s Guide or wlm(5).
HP-UX WLM SNMP Toolkit Audience for the SNMPTK documentation Audience for the SNMPTK documentation This SNMPTK information is intended for anyone implementing WLM and would like to use SNMP data as metrics in WLM configurations.
HP-UX WLM SNMP Toolkit Why use SNMPTK? Why use SNMPTK? SNMPTK allows easy access to SNMP data that you can use in your WLM configuration to: • Drive SLO goals • Set up shares-per-metric allocations • Enable and disable SLOs Sources of data include: • PRM data, available starting at the OID .1.3.6.1.4.1.11.5.4.2.1 (hp.hpSysMgt.hpUXSysMgt.hpPRM.prmReadOnly) • Pay per use (PPU) data, available starting at the OID .1.3.6.1.4.1.11.11.1 (hp.hpUtility.
HP-UX WLM SNMP Toolkit Where do I get SNMPTK? Where do I get SNMPTK? SNMPTK is installed at: /opt/wlm/toolkits/snmp/ If it is not already installed on your system, you can download it free of charge from the following Web site: http://www.hp.com/go/wlm What comes with SNMPTK? SNMPTK comes with the snmpdc utility, its manpage, and an example configuration file. Table 7-1 lists many of the included files. Table 7-1 SNMPTK directories and files Directory/file Description /opt/wlm/share/man/man5.Z/wlmtk.
HP-UX WLM SNMP Toolkit How do I use SNMPTK? How do I install SNMPTK? Use the SD-UX swinstall command to install SNMPTK, which is part of the WLM Toolkits product (product number WLMToolkits). The SNMP toolkit is installed at /opt/wlm/toolkits/snmp/. The manpages are installed at: /opt/wlm/share/man/ For more information about installation procedures and related issues, see the following documentation: • Managing HP-UX Software with SD-UX • swinstall (1M) How do I use SNMPTK? To use SNMPTK: Step 1.
HP-UX WLM SNMP Toolkit How do I use SNMPTK? Step 2. Use the SNMP data item as a metric In the WLM configuration file, use the metric, in this case active_processes, in an SLO in any of the following statements: • goal statement • cpushares statement • condition or exception statement In the following example, our metric is used in a condition statement. This SLO will request 40 CPU shares for the group g3 when there are fewer than 200 processes currently active on the system.
HP-UX WLM SNMP Toolkit Example WLM configuration Example WLM configuration This section includes the following example configuration: /opt/wlm/toolkits/snmp/config/minimalist.wlm This configuration shows how to use an SNMP value to enable and disable SLOs. # # # # # # # # # # # # # # # # # # # # # # # # # Name: minimalist.wlm Version information: (C) Copyright 2002-2005 Hewlett-Packard Development Company, L.P. $Revision: 1.
HP-UX WLM SNMP Toolkit Example WLM configuration # Workload group definitions # # Change the application record to include the names of the binaries that # make up the workload. When WLM starts, it will automatically move # those processes into the specified group. See the wlmconf(4) manpage # for more details on application records.
HP-UX WLM SNMP Toolkit Command reference # # It reports the number of currently active processes. # tune m_workload { coll_argv = wlmrcvdc /opt/wlm/lbin/coll/snmpdc -r .1.3.6.1.4.1.11.2.3.1.4.1.0; } Command reference SNMPTK consists of the snmpdc data collector. The data collector is described below. snmpdc The snmpdc tool is a data collector for WLM. It is specified in the WLM configuration file. The WLM daemon wlmd invokes snmpdc at startup.
HP-UX WLM SNMP Toolkit Related information 154 Chapter 7