'\" te .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. .TH HBA_GetPortStatistics 3HBAAPI "1 Sep 2003" "SunOS 5.11" "Common Fibre Channel HBA Information Library Functions" .SH NAME HBA_GetPortStatistics, HBA_GetFC4Statistics, HBA_GetFCPStatistics, HBA_ResetStatistics \- Access Port statistics for a specific HBA port. .SH SYNOPSIS .LP .nf cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lHBAAPI\fR [ \fIlibrary\fR\&.\|.\|. ] #include \fBHBA_STATUS\fR \fBHBA_GetPortStatistics\fR(\fBHBA_HANDLE\fR \fIhandle\fR, \fBHBA_UINT32\fR \fIportindex\fR, \fBHBA_PORTSTATISTICS *\fR\fIportstatistics\fR); .fi .LP .nf \fBHBA_STATUS\fR \fBHBA_GetFC4Statistics\fR(\fBHBA_HANDLE\fR \fIhandle\fR, \fBHBA_WWN\fR \fIportWWN\fR, \fBHBA_UINT8\fR \fIFC4type\fR, \fBHBA_FC4STATISTICS *\fR \fIstatistics\fR); .fi .LP .nf \fBHBA_STATUS\fR \fBHBA_GetFCPStatistics\fR(\fBHBA_HANDLE\fR \fIhandle\fR, \fBconst HBA_SCSIID *\fR \fIlunid\fR, \fBHBA_FC4STATISTICS *\fR \fIstatistics\fR); .fi .LP .nf \fBvoid\fR \fBHBA_ResetStatistics\fR(\fBHBA_HANDLE\fR \fIhandle\fR, \fBHBA_UINT32\fR \fIportindex\fR); .fi .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIhandle\fR\fR .ad .RS 18n .rt an open handle returned from \fBHBA_OpenAdapter\fR(3HBAAPI) .RE .sp .ne 2 .mk .na \fB\fIportindex\fR\fR .ad .RS 18n .rt the index of a specific port on the HBA as returned by a call to \fBHBA_GetAdapterAttributes\fR(3HBAAPI). The maximum value specified should be (\fBHBA_ADAPTERATTRIBUTES.NumberOfPorts\fR - 1). .RE .sp .ne 2 .mk .na \fB\fIportstatistics\fR\fR .ad .RS 18n .rt a pointer to an \fBHBA_PORTSTATISTICS\fR structure. Upon successful completion, this structure contains the specified port attributes. .RE .sp .ne 2 .mk .na \fB\fIportWWN\fR\fR .ad .RS 18n .rt the Port WWN of the local HBA for which FC-4 statistics is being returned .RE .sp .ne 2 .mk .na \fB\fIFC4type\fR\fR .ad .RS 18n .rt FC-4 protocol Data Structure Type as defined in FC-FS for which statistics are being requested .RE .sp .ne 2 .mk .na \fB\fIstatistics\fR\fR .ad .RS 18n .rt a pointer to an \fBHBA_FC4STATISTICS\fR structure where the specified statistics is being returned .RE .sp .ne 2 .mk .na \fB\fIlunid\fR\fR .ad .RS 18n .rt a pointer to an \fBHBA_SCSIID\fR structure specifying the OS SCSI logical unit where statistics are being requested .RE .SH DESCRIPTION .sp .LP The \fBHBA_GetPortStatistics()\fR function retrieves the statistical information from a given HBA port. .sp .LP The \fBHBA_GetFC4Statistics()\fR function retrieves the traffic statistics for a specific FC-4 protocol. .sp .LP The \fBHBA_GetFCPStatistics()\fR function retrieves the traffic statistics for a specific FC-4 protocol on the specified OS SCSI logical unit through that port. .sp .LP The \fBHBA_ResetStatistics()\fR function sesets the statistical counters to zero for a given HBA port. .SH RETURN VALUES .sp .LP Upon successful completion, \fBHBA_GetPortStatistics()\fR returns \fBHBA_STATUS_OK\fR. Otherwise, an error value is returned from the underlying VSL and the values in \fIportstatistics\fR are undefined. If the VSL does not support a specific statistic, that statistic will have every bit set to 1. .sp .LP Upon successful completion, \fBHBA_GetFC4Statistics()\fR and \fBHBA_GetFCPStatistics()\fR return \fBHBA_STATUS_OK\fR. Otherwise, an error value is returned from the underlying VSL and the values in \fIstatistics\fR are undefined. If the VSL does not support a specific statistic, that statistic will have every bit set to 1. .SH ERRORS .sp .LP See \fBlibhbaapi\fR(3LIB) for general error status values. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ T{ Standard: FC-HBA Version 4 (API version 2) T} _ MT-LevelSafe _ StandardFC-MI 1.92 (API version 1) .TE .SH SEE ALSO .sp .LP \fBHBA_GetAdapterAttributes\fR(3HBAAPI), \fBHBA_OpenAdapter\fR(3HBAAPI), \fBlibhbaapi\fR(3LIB), \fBattributes\fR(5) .sp .LP T11 FC-MI Specification