Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX SNAplus2 NOF Programmers Guide: HP-UX 11i > Chapter 4 NOF API Verbs (QUERY Verbs)

QUERY_BUFFER_AVAILABILITY

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

This verb returns information about the amount of STREAMS buffers that SNAplus2 is currently using, the maximum amount it has used, and the maximum amount available (specified using the SET_BUFFER_AVAILABILITY verb). This allows you to check STREAMS buffer usage and set the limit appropriately, to ensure that sufficient buffers are available for SNAplus2 components and for other programs on the HP-UX computer. The verb also returns additional internal values relating to buffer usage, for use by SNAplus2 support personnel.

VCB Structure

typedef struct query_buffer_availability
{
AP_UINT16 opcode; /* verb operation code */
unsigned char reserv2; /* reserved */
unsigned char format; /* reserved */
AP_UINT16 primary_rc; /* primary return code */
AP_UINT32 secondary_rc; /* secondary return code */
AP_UINT32 reset_max_values; /* set stored max values to */
/* current */
AP_UINT32 buf_avail; /* maximum buffer space */
/* available */
AP_UINT32 buf_total_count; /* current buffer usage - count */
AP_UINT32 buf_total_bytes; /* current buffer usage - bytes */
AP_UINT32 buf_rsrv_count; /* buffers reserved - count */
AP_UINT32 buf_rsrv_bytes[2]; /* buffers reserved - bytes */
AP_UINT32 buf_res_use_count; /* usage of reserved buffers */
/* - count */
AP_UINT32 buf_res_use_bytes; /* usage of reserved buffers */
/* - bytes */
AP_UINT32 peak_usage; /* peak usage */
AP_UINT32 peak_decay; /* peak decay */
unsigned char throttle_status; /* throttle status */
unsigned char buf_use_status; /* congestion status */
AP_UINT32 max_buf_total_count; /* maximum buffer usage - count */
AP_UINT32 max_buf_total_bytes; /* maximum buffer usage - bytes */
AP_UINT32 max_buf_rsrv_count; /* max buffers reserved - count */
AP_UINT32 max_buf_rsrv_bytes[2]; /* max buffers reserved - bytes */
AP_UINT32 max_buf_res_use_count; /* max rsrv buffer usage - count */
AP_UINT32 max_buf_res_use_bytes; /* max rsrv buffer usage - bytes */
AP_UINT32 max_peak_usage; /* maximum peak usage */
unsigned char max_throttle_status; /* maximum throttle status */
unsigned char max_buf_use_status; /* maximum congestion status */
unsigned char debug_param[32]; /* reserved */
} QUERY_BUFFER_AVAILABILITY;

Supplied Parameters

The application supplies the following parameters:

opcode

AP_QUERY_BUFFER_AVAILABILITY

reset_max_values

Specify whether SNAplus2 should reset the values for the max_* parameters (after returning them on this verb) to match the current values of these parameters. This ensures that a subsequent QUERY_BUFFER_AVAILABILITY verb will return the maximum values reached since this verb, rather than the maximum values reached since the system was started (or since the values for the max_* parameters were last reset). Possible values are:

AP_YES

Reset the values for the max_* parameters to match the current values.

AP_NO

Do not reset the values for the max_* parameters.

Returned Parameters: Successful Execution

If the verb executes successfully, SNAplus2 returns the following parameters. Values returned in other fields are for use by SNAplus2 support personnel.

primary_rc

AP_OK

secondary_rc

Not used.

buf_avail

The maximum amount of STREAMS buffer space available to SNAplus2, in bytes, as defined by a SET_BUFFER_AVAILABILITY verb.

buf_total_count

The number of buffers currently allocated to SNAplus2 components.

buf_total_bytes

The total amount of storage in buffers currently allocated to SNAplus2 components.

buf_rsrv_count

The total number of buffers reserved.

buf_rsrv_bytes

The total amount of storage in buffers reserved, in bytes.

buf_res_use_count

The number of reserved buffers in use.

buf_res_use_bytes

The number of bytes in the reserved buffers currently in use.

peak_usage

Peak buffer usage-smoothed percentage of buffers that are actually used.

peak_decay

Smoothing parameter.

throttle_status

Adaptive pacing status.

buf_use_status

Congestion status. Possible values are:

  • AP_CONGESTED

  • AP_UNCONGESTED

max_buf_total_count

The maximum number of buffers that have been allocated to SNAplus2 components at any time.

max_buf_total_bytes

The maximum amount of buffer storage that has been allocated to SNAplus2 components at any time.

max_buf_rsrv_count

The maximum number of buffers that can be reserved.

max_buf_rsrv_bytes

The maximum amount of buffer storage that can be reserved, in bytes.

max_buf_res_use_count

The maximum number of reserved buffers that can be in use.

max_buf_res_use_bytes

The maximum number of bytes of reserved buffers that can be in use at any time.

max_peak_usage

Maximum peak buffer usage-smoothed percentage of buffers actually used.

max_throttle_status

Maximum adaptive pacing status.

max_buf_use_status

Maximum congestion status. Possible values are:

  • AP CONGESTED

  • AP_UNCONGESTED

Returned Parameters: Other Conditions

Appendix A “Common Return Codes” lists further combinations of primary and secondary return codes that are common to all NOF verbs.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.