HP WebQoS User's Guide

HP WebQoS on HP-UX
API Programmer’s Guide
Edition 1
HP 9000 Networking
Manufacturing Part Number: B8311-90003
E1299
U.S.A.
© Copyright 1999, Hewlett-Packard Company.
Legal Notices
The information in this document is subject to change without notice.
Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard
shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material.
Warranty. A copy of the specific warranty terms applicable to your Hewlett- Packard product and replacement parts can be obtained from your local Sales and Service Office.
Restricted Rights Legend. Use, duplication or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 for DOD agencies, and subparagraphs (c) (1) and (c) (2) of the Commercial Computer Software Restricted Rights clause at FAR 52.227-19 for other agencies.
HEWLETT-PACKARD COMPANY 3000 Hanover Street Palo Alto, California 94304 U.S.A.
Use of this manual and flexible disk(s) or tape cartridge(s) supplied for this pack is restricted to this product only. Additional copies of the programs may be made for security and back-up purposes only. Resale of the programs in their present form or with alterations, is expressly prohibited.
Copyright Notices. ©copyright 1983-99 Hewlett-Packard Company, all rights reserved.
Reproduction, adaptation, or translation of this document without prior written permission is prohibited, except as allowed under the copyright laws.
©copyright 1979, 1980, 1983, 1985-93 Regents of the University of California
This software is based in part on the Fourth Berkeley Software Distribution under license from the Regents of the University of California.
©copyright 1980, 1984, 1986 Novell, Inc. ©copyright 1986-1992 Sun Microsystems, Inc. ©copyright 1985-86, 1988 Massachusetts Institute of Technology. ©copyright 1989-93 The Open Software Foundation, Inc. ©copyright 1986 Digital Equipment Corporation. ©copyright 1990 Motorola, Inc. ©copyright 1990, 1991, 1992 Cornell University ©copyright 1989-1991 The University of Maryland ©copyright 1988 Carnegie Mellon University Trademark Notices. UNIX is a registered trademark in the United
States and other countries, licensed exclusively through X/Open Company Limited.
X Window System is a trademark of the Massachusetts Institute of Technology.
OSF/Motif is a trademark of the Open Software Foundation, Inc. in the U.S. and other countries.
Contents
1. About the WebQoS API
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
2. Using the WebQoS API
wq_get_session_cls() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Return Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
wq_set_session_cls() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
cls Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Return Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
wq_get_proc_cls(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Return Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Multithreaded Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
wq_set_proc_cls() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
class Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Return Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Contents
Multithreaded Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3. Troubleshooting
Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Request Classification Rule Class Error Codes . . . . . . . . . . . . . . . . . . . 28
wq_get_session_cls() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
wq_set_session_cls() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Process Group Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
wq_get_proc_cls() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
wq_set_proc_cls(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Sample Session Class Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Sample Process Group Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
svccls.allow Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
webqosapi.h Header File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Printing History
The manual printing date and part number indicate its current edition. The printing date will change when a new edition is printed. Minor changes may be made at reprint without changing the printing date. The manual part number will change when extensive changes are made.
Manual updates may be issued between editions to correct errors or document product changes. To ensure that you receive the updated or new editions, you should subscribe to the appropriate product support service. See your HP sales representative for details.
First Edition: December 1999 (HP-UX Release 11.0)
1 About the WebQoS API
About the WebQoS API

Overview

Overview
Using the WebQoS API, an application can reassign the classification rule class of a session and the process group of a process. This allows more fine-tuning of the assigned class(es). WebQoS must be configured to allow these changes to be made. Refer to the Installing and Configuring WebQoS on HP-UX manual for more information about configuring WebQoS.
The following figures show how the WebQoS API can be used to change the class of a classification rule and process group. The first two figures represent a single session.
Figure 1-1 Example — Initial Service Request
WebQoS
Initial Service Request
medium class classification rule
Web Server
In Figure 1-1, “Example — Initial Service Request,” the initial service request is made by a client (for example, a browser). WebQoS sets the request classification rule class to medium and passes the request to the web server. The web server passes the request to the application which then sets the request classification rule class to high for this request.
Figure 1-2 Example — Subsequent Service Requests
WebQoS
high class
Subsequent Service Requests
classification rule
Web Server
In Figure 1-2, “Example — Subsequent Service Requests,” subsequent requests during this WebQoS session use the high request classification rule class set by the application. The application can change the request classification rule class value one or more times during the session. This
medium class classification rule
high class classification rule
high class classification rule
Plug-In
Plug-In
10 Chapter1
value is effective for subsequent requests for the current session.
Figure 1-3 Example — Setting the Process Group
Process Groups
About the WebQoS API
Overview
Process Groups
Process A
Process B
WebQoS
In Figure 1-3, “Example — Setting the Process Group,”two processes are assigned different process groups by WebQoS: Process A is assigned medium and Process B is assigned low. Process A requests that it be moved to the high process group. The WebQoS administrator must have configured the svccls.allow configuration file to allow a process to change its process group.
High
Medium
Low
WebQoS API
High
Medium
Low
Chapter 1 11
About the WebQoS API
Overview
12 Chapter1

2 Using the WebQoS API

The WebQoS API is installed with the WebQoS software. For more information about installing the WebQoS API, refer to the Installing and Configuring HP WebQoS manual.
13
Loading...
+ 30 hidden pages