Using the WebQoS API

wq_get_proc_cls()

Errors

If error logging to syslog is enabled, certain errors are logged to a file (you can specify the file in /etc/syslog.conf). Refer to the syslog(3C) and syslogd(1M) man pages for information about enabling logging.

 

When an error occurs, errorcode is set to one of the following:

Table 2-6

wq_get_proc_cls() Error Codes

 

 

 

 

Error Code

Description

 

 

 

 

WQERR_NOTREADY

PRM is not installed or not configured on the system.

 

 

 

 

WQERR_OTHER

If error logging to syslog is enabled (“error” level for

 

 

all facilities), the error is logged to a file.

 

 

 

Multithreaded Applications

For HP-UX 10.20 (supports user-level threads only), all user-level threads within one process are in the same process group. wq_get_proc_cls() returns the same value when called from any of the threads of a process.

For HP-UX 11.0 (supports 1x1 kernel threads), a thread in user space corresponds to a kernel thread (also known as a Light Weight Process, LWP). LWPs may belong to different process groups. wq_get_proc_cls() may return different values within the same process. Currently, WebQoS cannot move a thread from one process group to another. Therefore, all threads in a process are in the same process group.

This function is thread safe.

Example

See Appendix A , “Sample Programs, Configuration, and Header Files,” on page 33 for an example.

Chapter 2

21

Page 21
Image 21
HP WebQoS Software manual Multithreaded Applications