fcstat Command
Purpose
Displays the statistics that are gathered by the specified Fibre Channel (FC) device driver.
Syntax
fcstat [ -z [ -d | -c ] | -d | -e [ -d | -c ] | -c ] Device_Name
fcstat -t Interval [ -p Protocol ] Device_Name
Description
- Opens the message catalog of fcstat and checks the parameter list.
- Accesses the Object Data Manager (ODM) database for information that relates to the selected adapter.
- Accesses the ODM database for information that relates to ports of the selected adapter.
- Opens and accesses adapter statistics.
- Resets some of the statistics if you specify the -z flag.
- Reports statistics and exits.
If an invalid Device_Name is specified, the fcstat command returns an error message that states that it cannot find the device in the ODM database.
The fcstat command also reports the statistics if the specified Device_Name is not connected to a network (that is, the link is down), by opening the device in diagnostic mode. The fcstat command opens the device in diagnostic mode by using the -d flag. When the link is down and the device is opened in nondiagnostic mode, the fcstat command delays in generating the output. You can use the -c flag to remove this delay. If the device is already opened and the fcstat command is started with the -d flag, the open operation on the device fails with an EACCESS error.
When the fcstat command is not able to extract statistics from the specified Device_Name, it still reports the information that it extracted from the ODM database.
You can also use the fcstat command to generate a time-series report of traffic statistics continuously by using the -t flag. The Interval parameter of the -t flag specifies the time interval in seconds between each report. If you specify zero as the value of the Interval parameter, the fcstat command creates a single report. In each report, traffic statistics for a single transport protocol (TP) is printed in a row. If the adapter supports many transport protocols, statistics for each protocol is printed in separate rows. To generate the time-series report for only a specific transport protocol, use the Protocol parameter of the -p flag to specify the transport protocol.
Read Reqs(K)
: The number of read or input requests, in thousands.Write Reqs(K)
: The number of write or output requests, in thousands.Read(GB)
: The number of input bytes that are read, in gigabytes.Write(GB)
: The number of output bytes that are written, in gigabytes.
Flags
Item | Description |
---|---|
-c | Removes the delay in generating the output when the device is opened in nondiagnostic mode and the link is down. |
-d | Displays the statistics by opening the adapter in diagnostic mode. |
-e | Displays all the statistics, that includes the device-specific statistics such as driver statistics, link statistics, FC4 types, and vital Small Form-factor Pluggable (SFP) parameters. |
-p | Displays a time-series report of traffic statistics for a specific transport protocol (TP) that is specified with the Protocol parameter. |
-t | Displays a time-series report of the traffic statistics continuously with a time interval between two consecutive reports, which is specified with the Interval parameter. |
-z | Resets some of the statistics back to their initial values. Only privileged users can issue this flag. |
Parameters
Item | Description |
---|---|
Device_Name | The name of the Fibre Channel device. For example, fcs0 . |
Interval | The time interval in seconds between two reports generated by the fcstat -t command. All positive integers are valid values. |
Protocol | The specific transport protocol for the -p
flag. Valid values are scsi and nvme . |
Statistics fields
Following are the statistic fields that are displayed in the output of the fcstat command and their descriptions:
Item | Description | |
---|---|---|
Device Type |
Displays the description of the adapter. | |
Serial Number |
Displays the serial number from the adapter. | |
Option ROM Version |
Displays the version of the Options ROM on the adapter. | |
ZA |
Displays the ZA field from the VPD of the adapter. |
|
Node WWN |
Displays the worldwide name of the adapter. | |
Port FC ID |
Displays the SCSI ID of the adapter. | |
Port Type |
Displays the connection type of the adapter. | |
Port Speed |
Displays the speed of the adapter. | |
Port WWN |
Displays the worldwide name of the port. | |
Seconds Since Last Reset |
Displays the seconds since last reset of the statistics on the adapter. | |
* | Frames |
Displays the number of frames that are transmitted and received. |
* | Words |
Displays the number of words that are transmitted and received. |
* | LIP Count |
Displays the LIP count. |
* | NOS Count |
Displays the NOS count. |
Error Frames |
Displays the number of frames that were in error. | |
* | Dumped Frames |
Displays the frames that were dumped. |
Link Failure Count |
Displays the Link Failure Count. | |
Loss of Sync Count |
Displays the number of times sync was lost. | |
Loss of Signal |
Displays the number of times signal was lost. | |
Primitive Seq Protocol Err Count |
Displays the number of times a primitive sequence was in error. | |
Invalid Tx Word Count |
Displays the number of invalid transfers that occurred. | |
Invalid CRC Count |
Displays the number of CRC errors that occurred. | |
FC SCSI Adapter Driver Information: No DMA Resource Count |
Displays the number of times DMA resources were not available. | |
FC SCSI Adapter Driver Information: No Adapter Elements Count |
Displays the number of times no adapter elements were available. | |
FC SCSI Adapter Driver Information: No Command Resource Count |
Displays the number of times no command resources were available. | |
* | FC SCSI Traffic Statistics: Input Requests |
Displays the number of input requests. |
* | FC SCSI Traffic Statistics: Output Requests |
Displays the number of output requests. |
* | FC SCSI Traffic Statistics: Control Requests |
Displays the number of control requests. |
* | FC SCSI Traffic Statistics: Input Bytes |
Displays the number of input bytes. |
* | FC SCSI Traffic Statistics: Output Bytes |
Displays the number of output bytes. |
Adapter Effective Max Transfer Value |
Displays the effective max transfer value. | |
FC4 Types: Supported ULP |
Displays the supported ULP. | |
FC4 Types: Active ULP |
Displays the active ULP. | |
Network Information: Fabric Node Name |
Displays the node name of the network switch where the adapter is connected when the connection type is fabric. | |
Network Information: P2P Port Name |
Displays the port name of the target port where the adapter is connected when the connection type is point-to-point. | |
SFP Information |
Displays vital SFP parameters such as vendor information, temperature, and voltage information. |
Exit Status
Item | Description |
---|---|
0 |
The command completed successfully. |
>0 |
An error occurred. |
Examples
- To display the statistics for Fibre Channel device driver
fcs0
, enter the following command:
An output that is similar to the following example is displayed:fcstat fcs0
Note: The output format of various AIX® commands is not always static. Do not write programs with the expectation that the output for the fcstat command remains as follows.FIBRE CHANNEL STATISTICS REPORT: fcs0 Device Type: FC Adapter (df1000f9) Serial Number: 1E313BB001 Option ROM Version: 02C82115 ZA: B1F2.10A5 Node WWN: 20000000C9487B04 Port WWN: 10000000C9416DA4 FC4 Types Supported: 0x0000010000000000000000000000000000000000000000000000000000000000 Active: 0x0000010000000000000000000000000000000000000000000000000000000000 Class of Service: 4 Port FC ID: 011400 Port Speed (supported): 2 GBIT Port Speed (running): 1 GBIT Port Type: Fabric Seconds Since Last Reset: 345422 Transmit Statistics Receive Statistics ------------------- ------------------ Frames: 1 Frames: 1 Words: 1 Words: 1 LIP Count: 1 NOS Count: 1 Error Frames: 1 Dumped Frames: 1 Link Failure Count: 1 Loss of Sync Count: 1 Loss of Signal: 1 Primitive Seq Protocol Err Count: 1 Invalid Tx Word Count: 1 Invalid CRC Count: 1 FC SCSI Adapter Driver Information No DMA Resource Count: 0 No Adapter Elements Count: 0 No Command Resource Count: 0 FC SCSI Traffic Statistics Input Requests: 16289 Output Requests: 48930 Control Requests: 11791 Input Bytes: 128349517 Output Bytes: 209883136
- To display the time-series report of traffic statistics with two-seconds interval
for a Fibre Channel device
fcs0
, enter the following command:fcstat -t 2 fcs0
An output that is similar to the following example is displayed:
FIBRE CHANNEL STATISTICS REPORT: fcs0 Device Type: PCIe3 2-Port 32Gb FC Adapter (df1000e314101506) (adapter/pciex/df1000e31410150) TP Read Reqs(K) Write Reqs(K) Read (GB) Write (GB) ===== ================= ================= =========== =========== SCSI 9614 34 695 9 NVMe 2539 147 163 16 SCSI 9679 60 701 10 NVMe 2602 175 167 18 SCSI 9800 114 709 14 NVMe 2644 194 170 19 SCSI 9935 174 718 18 NVMe 2679 209 173 20 SCSI 10070 234 726 22 NVMe 2715 225 175 21 SCSI 10205 294 735 26 NVMe 2751 241 177 22
Location
/usr/sbin/fcstat