SAPStatistics(3sapd)


SAPStatistics -- get SAP daemon statistics

Synopsis

#include <sap_app.h> 

int SAPStatistics(SAPD *sapstats);

Description

SAPStatistics returns a structure filled with statistics about the SAP process and the available services. The sapstats argument specifies the address of the SAPD structure which receives the statistics.


NOTE: This function is supported only when the SAP daemon is running.

The SAPD structure contains the following fields:

   typedef struct sap_data { 
      time_t   StartTime; 
      pid_t    SapPid; 
      uint16   Lans; 
      uint8    MyNetworkAddress[IPX_ADDR_SIZE]; 
      int32    ConfigServers; 
      clock_t  RevisionStamp; 
      int32    ServerPoolIdx; 
      uint32   ProcessesToNotify; 
      uint32   NotificationsSent; 
      uint32   TotalInSaps; 
      uint32   GSQReceived; 
      uint32   GSRReceived; 
      uint32   NSQReceived; 
      uint32   SASReceived; 
      uint32   SNCReceived; 
      uint32   GSIReceived; 
      uint32   NotNeighbor; 
      uint32   EchoMyOutput; 
      uint32   BadSizeInSaps; 
      uint32   BadSapSource; 
      uint32   TotalInRipSaps; 
      uint32   BadRipSaps; 
      uint32   RipServerDown; 
      uint32   TotalOutSaps; 
      uint32   NSRSent; 
      uint32   GSRSent; 
      uint32   GSQSent; 
      uint32   SASAckSent; 
      uint32   SASNackSent; 
      uint32   SNCAckSent; 
      uint32   SNCNackSent; 
      uint32   GSIAckSent; 
      uint32   BadDestOutSaps; 
      uint32   SrvAllocFailed; 
      uint32   MallocFailed; 
   } SAPD, *SAPDP; 


NOTE: To details of how to display the information maintained by the SAPD structure, refer to the nwsapinfo(1ipx) manual page.

The following table describes the control information fields of the SAPD structure (this is internal information concerning configuration and local requests):

Field Description
SapPid Process ID of SAP daemon process.
Lans Number of connected LANs, including internal LAN.
MyNetworkAddress Workstation network address.
ConfigServers Total configured server entries.
RevisionStamp Revision of last update.
ServerPoolIdx Index to next unused server entry.
ProcessesToNotify Number of processes to notify of changes.
NotificationsSent Number of notifications sent to processes.
GSIReceived Number of local SAP Get Mapped Memory ID requests.
GSIAckSent Number of Get Mapped Memory ID ACKs.
TotalInRipSaps Total ``RIP network down'' packets received.
BadRipSaps Bad ``RIP network down'' packets received.
RipServerDown Server set to ``down'' due to RIP interaction.

 
 ------------------------------------------------------------------- 
| Field            |  Description                                  | 
|------------------|-----------------------------------------------| 
| SapPid           |  Process ID of SAP daemon process.            | 
|------------------|-----------------------------------------------| 
| Lans             |  Number of connected LANs, including internal | 
|                  |  LAN.                                         | 
|------------------|-----------------------------------------------| 
| MyNetworkAddress |  Workstation network address.                 | 
|------------------|-----------------------------------------------| 
| ConfigServers    |  Total configured server entries.             | 
|------------------|-----------------------------------------------| 
| RevisionStamp    |  Revision of last update.                     | 
|------------------|-----------------------------------------------| 
| ServerPoolIdx    |  Index to next unused server entry.           | 
|------------------|-----------------------------------------------| 
| ProcessesToNotify|  Number of processes to notify of changes.    | 
|------------------|-----------------------------------------------| 
| NotificationsSent|  Number of notifications sent to processes.   | 
|------------------|-----------------------------------------------| 
| GSIReceived      |  Number of local SAP Get Mapped Memory ID     | 
|                  |  requests.                                    | 
|------------------|-----------------------------------------------| 
| GSIAckSent       |  Number of Get Mapped Memory ID ACKs.         | 
|------------------|-----------------------------------------------| 
| TotalInRipSaps   |  Total ``RIP network down'' packets received. | 
|------------------|-----------------------------------------------| 
| BadRipSaps       |  Bad ``RIP network down'' packets received.   | 
|------------------|-----------------------------------------------| 
| RipServerDown    |  Server set to ``down'' due to RIP            | 
|                  |  interaction.                                 | 
|------------------|-----------------------------------------------| 
The statistical fields in the SAPD structure contain counts only for over-the-wire requests and responses. The following table describes each of these statistical fields:

Statistical Type Field Description
StartTime Time in seconds since SAPD was started.
Packets Received TotalInSaps Total SAP packets received.
GSQReceived General Server Query packets received.
GSRReceived General Server Reply packets received.
NSQReceived Nearest Server Query packets received.
SASReceived Number of local servers that have requested SAP to advertise their service (SAS requests).
SNCReceived Number of local processes that have requested notification of changes (SNC requests).
NotNeighbor Packets received from sources not on LAN. If all SAP agents on the LAN are functioning correctly, this should be zero.
EchoMyOutput Broadcast packets sent by SAPD which were echoed back to SAPD by the LAN driver. This should be zero.
BadSizeInSaps Packets received which have an incorrect packet size. This should be zero.
BadSapSource Packets received which have a bad source address.
Packets Sent TotalOutSaps Total SAP packets sent.
NSRSent Nearest Server Response packets sent.
GSRSent General Service Reply packets sent.
GSQSent General Service Query packets sent.
SASAckSent ACKs sent in response to SAS requests (see the SASReceived field).
SASNackSent NAKs (negative acknowledgments) sent in response to SAS requests (see the SASReceived field).
SNCAckSent ACKs sent in response to SNC requests (see the SNCRequest field).
SNCNackSent NAKs sent in response to SNC requests (see the SNCRequest field).
BadDestOutSaps SAP packets sent which had an invalid destination network address.
Memory Error SrvAllocFailed Number of server allocation request failures. If greater than zero, indicates memory problems. The NetWare® protocol stack needs to be downed, SAPD reconfigured for a larger shared memory region, and the NetWare protocol stack started again.
MallocFailed Number of Malloc request failures. If greater than zero, indicates memory problems. The NetWare protocol stack needs to be downed, SAPD reconfigured for a larger shared memory region, and the NetWare protocol stack started again.

 
 ---------------------------------------------------------------------------------------- 
| Statistical Type|  Field          |  Description                                      | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  StartTime      |  Time in seconds since SAPD was started.          | 
|-----------------|-----------------|---------------------------------------------------| 
| Packets Received|  TotalInSaps    |  Total SAP packets received.                      | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  GSQReceived    |  General Server Query packets received.           | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  GSRReceived    |  General Server Reply packets received.           | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  NSQReceived    |  Nearest Server Query packets received.           | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  SASReceived    |  Number of local servers that have requested SAP  | 
|                 |                 |  to advertise their service (SAS requests).       | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  SNCReceived    |  Number of local processes that have requested    | 
|                 |                 |  notification of changes (SNC requests).          | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  NotNeighbor    |  Packets received from sources not on LAN. If all | 
|                 |                 |  SAP agents on the LAN are functioning correctly, | 
|                 |                 |  this should be zero.                             | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  EchoMyOutput   |  Broadcast packets sent by SAPD which were echoed | 
|                 |                 |  back to SAPD by the LAN driver. This should be   | 
|                 |                 |  zero.                                            | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  BadSizeInSaps  |  Packets received which have an incorrect packet  | 
|                 |                 |  size. This should be zero.                       | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  BadSapSource   |  Packets received which have a bad source address.| 
|-----------------|-----------------|---------------------------------------------------| 
| Packets Sent    |  TotalOutSaps   |  Total SAP packets sent.                          | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  NSRSent        |  Nearest Server Response packets sent.            | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  GSRSent        |  General Service Reply packets sent.              | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  GSQSent        |  General Service Query packets sent.              | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  SASAckSent     |  ACKs sent in response to SAS requests (see the   | 
|                 |                 |  SASReceived field).                              | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  SASNackSent    |  NAKs (negative acknowledgments) sent in response | 
|                 |                 |  to SAS requests (see the SASReceived field).     | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  SNCAckSent     |  ACKs sent in response to SNC requests (see the   | 
|                 |                 |  SNCRequest field).                               | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  SNCNackSent    |  NAKs sent in response to SNC requests (see the   | 
|                 |                 |  SNCRequest field).                               | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  BadDestOutSaps |  SAP packets sent which had an invalid destination| 
|                 |                 |  network address.                                 | 
|-----------------|-----------------|---------------------------------------------------| 
| Memory Error    |  SrvAllocFailed |  Number of server allocation request failures. If | 
|                 |                 |  greater than zero, indicates memory problems. The| 
|                 |                 |  NetWare® protocol stack needs to be downed, SAPD | 
|                 |                 |  reconfigured for a larger shared memory region,  | 
|                 |                 |  and the NetWare protocol stack started again.    | 
|-----------------|-----------------|---------------------------------------------------| 
|                 |  MallocFailed   |  Number of Malloc request failures. If greater    | 
|                 |                 |  than zero, indicates memory problems. The NetWare| 
|                 |                 |  protocol stack needs to be downed, SAPD          | 
|                 |                 |  reconfigured for a larger shared memory region,  | 
|                 |                 |  and the NetWare protocol stack started again.    | 
|-----------------|-----------------|---------------------------------------------------| 

Parameters

(OUT) sapstats
Pointer to the address of the SAPD structure.

Return values

0
successful

-10
not supported (SAP daemon not running)

Examples

   SAPD sapstats; 
   ret = SAPStatistics(&sapstats); 

30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.