fcstat Command
Purpose
Displays the statistics that are gathered by the specified physical or virtual Fibre Channel (FC) device driver.
Syntax
fcstat [ -z [ -d | -c ] | -d | -e [ -d | -c ] | -c ] Device_Name
fcstat -t Interval [ -p Protocol ] Device_Name
fcstat
-l
Duration [ Interval ] Device_Name
Description
- Opens the message catalog of the fcstat command and checks the list of the parameter.
- Accesses the Object Data Manager (ODM) database for the information that is related to the selected adapter.
- Accesses the ODM database for the information that relates to ports of the selected adapter.
- Opens and accesses the statistics of the adapter.
- Resets some of the statistics if you specify the -z flag.
- Reports the 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.
If the specified Device_Name is not connected to a network (that is, the link
is down), the fcstat command reports the statistics by opening the device in a
diagnostic mode. The fcstat command opens the device in a diagnostic mode by
using the -d flag. When the link is down and the device is opened in a non
diagnostic 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.
If the fcstat command is not able to extract the statistics from the specified Device_Name, the fcstat command reports the information that it extracted from the ODM database.
You can 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 TPs, statistics for each protocol is printed in a separate row. To generate the time-series report for a specific TP, you can use the Protocol parameter of the -p flag to specify the TP.
-
Read Reqs(K)- Indicates the number of read or input requests in thousands.
Write Reqs(K)- Indicates the number of write or output requests in thousands.
Read(GB)- Indicates the number of input bytes that are read in gigabytes.
Write(GB)- Indicates the number of output bytes that are written in gigabytes.
If you specify the -l flag, the fcstat command displays the latencies of the I/O commands for a physical or virtual FC adapter for a specified duration in seconds. An optional interval parameter with the -l flag specifies the time interval in seconds between each report. If the time interval is not supplied, the default interval between each report is 3 seconds.
- Displays external SAN time, adapter time, VIOS time, and the hypervisor time.
- Displays the maximum time that is taken by one I/O command.
- Displays the latency statistics of the Good completion (Read, Write) I/Os, the Error I/Os, and the Timedout I/Os.
- Displays the latency statistics of the protocols that are configured for the FC port.Notes:
- The VIOS time and Hypervisor time are applicable only in virtual environment.
- The timeout commands statistics are not displayed for the NVME protocol.
- The latency statistics are not appropriate for virtual clients during LPM, if the Consumer Electronics Control (CEC) Firmware level of the source or destination is less than 1020.
Flags
| Item | Description |
|---|---|
| -c | Removes the delay in generating the output when the device is opened in a non diagnostic mode and the link is down. |
| -d | Displays the statistics by opening the adapter in a diagnostic mode. |
| -e | Displays the statistics that include the device-specific statistics such as driver statistics, link statistics, FC4 types, and vital Small Form-factor Pluggable (SFP) parameters. |
| Displays the latencies of the I/O commands. | |
| -p | Displays a time-series report of traffic statistics for a specific TP that is specified with the Protocol parameter. |
| -t | Displays a time-series report of the traffic statistics continuously with a time interval between the two consecutive reports, which is specified with the Interval parameter. |
| -z | Resets some of the statistics to their initial values. Only the privileged users can issue this flag. |
Parameters
| Item | Description |
|---|---|
| Device_Name | Indicates the name of the FC device. For example,
fcs0. |
| Indicates the duration of the time in seconds during which the latencies of the I/O commands are collected and displayed. The Duration must be specified with the -l flag. | |
| Interval | Indicates the time interval in seconds between the two reports that are generated by the -t or -l flags. The valid values of the time interval are positive integers. The Interval is optional for -l flag. |
| Protocol | Indicates the specific TP for the -p flag.
The valid values of the Protocol are scsi and
nvme. |
Statistics fields
The following table displays 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 the 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 the sync was lost. | |
Loss of Signal |
Displays the number of times the 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 | Indicates the successful completion of the command. |
| >0 | Indicates that an error occurred. |
Examples
- To display the statistics for FC device driver
fcs0, enter the following command:
An output that is similar to the following screen is displayed:fcstat fcs0Note: The output format of the various AIX commands is not always static. You mus not write the 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 the traffic statistics with an interval of 2
seconds for a Fibre Channel device
fcs0, enter the following command:fcstat -t 2 fcs0An output that is similar to the following screen 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 - To display the latency statistics of the I/O commands with a duration of 80 seconds and an
interval of 5 seconds for a virtual FC port
fcs0, enter the following command:# fcstat -l 80 5 fcs0An output that is similar to the following screen is displayed:# fcstat -l 80 5 fcs0 Proto_stats Num_Cmds IO_time Max_IO_time SAN_time FC_adapter_time avg(usec) (usec) avg(usec) avg(usec) ============= ======== =========== =========== ============ =============== SCSI(Read) 5279 5909 10182 5580 329 SCSI(Write) 5243 7883 19024 7265 618 SCSI(Error) 0 0 0 0 0 SCSI(Timeout) 0 0 0 0 0 NVME(Read) 618 5885 19119 4674 1211 NVME(Write) 589 6307 19116 5280 1027 NVME(Error) 0 0 0 0 0 ITERATION #2 ------------- SCSI(Read) 9790 5772 10182 5473 298 SCSI(Write) 9673 7882 19024 7259 622 SCSI(Error) 0 0 0 0 0 SCSI(Timeout) 0 0 0 0 0 NVME(Read) 1167 6243 19119 5047 1196 NVME(Write) 1125 6333 19230 5333 999 NVME(Error) 0 0 0 0 0 ITERATION #3 ------------- SCSI(Read) 14214 5760 18850 5480 280 SCSI(Write) 14117 7886 19098 7297 590 SCSI(Error) 0 0 0 0 0 SCSI(Timeout) 0 0 0 0 0 NVME(Read) 1673 6151 19119 5007 1144 NVME(Write) 1630 6422 19230 5469 953 NVME(Error) 0 0 0 0 0 ITERATION #4 ------------- SCSI(Read) 18625 5773 18850 5506 269 SCSI(Write) 18534 7867 19098 7294 575 SCSI(Error) 0 0 0 0 0 SCSI(Timeout) 0 0 0 0 0 NVME(Read) 2178 6076 19119 4918 1158 NVME(Write) 2143 6464 19230 5529 930 NVME(Error) 0 0 0 0 0 - To display the latency statistics of the I/O commands with a duration of 60 seconds without an
interval for a physical FC port
fcs0, enter the following command:
The default interval of 3 seconds is considered.# fcstat -l 60 fcs0An output that is similar to the following screen is displayed:# fcstat -l 60 fcs0 Proto_stats Num_Cmds IO_time Max_IO_time SAN_time FC_adapter_time avg(usec) (usec) avg(usec) avg(usec) ============= ======== =========== =========== ============ =============== SCSI(Read) 4812 4361 19267 3922 444 SCSI(Write) 226 5103 19069 4381 721 SCSI(Error) 0 0 0 0 0 SCSI(Timeout) 0 0 0 0 0 NVME(Read) 9178 2244 19054 1671 572 NVME(Write) 125 4712 9906 3888 823 NVME(Error) 0 0 0 0 0 ITERATION #2 ------------- SCSI(Read) 8303 4378 19267 3935 446 SCSI(Write) 409 5143 19069 4505 637 SCSI(Error) 0 0 0 0 0 SCSI(Timeout) 0 0 0 0 0 NVME(Read) 15832 2211 19082 1652 558 NVME(Write) 219 4830 9919 4141 688 NVME(Error) 0 0 0 0 0 ITERATION #3 ------------- SCSI(Read) 11753 4380 19267 3931 451 SCSI(Write) 562 5089 19069 4486 603 SCSI(Error) 0 0 0 0 0 SCSI(Timeout) 0 0 0 0 0 NVME(Read) 22445 2199 19082 1642 556 NVME(Write) 314 4885 9919 4222 662 NVME(Error) 0 0 0 0 0 ITERATION #4 ------------- SCSI(Read) 15231 4405 19487 3958 448 SCSI(Write) 705 5191 19069 4561 630 SCSI(Error) 0 0 0 0 0 SCSI(Timeout) 0 0 0 0 0 NVME(Read) 29297 2185 19082 1643 542 NVME(Write) 411 4746 10052 4078 668 NVME(Error) 0 0 0 0 0
Location
/usr/sbin/fcstat