fcstat Command

Purpose

Displays statistics that are gathered by the specified Fibre Channel device driver.

Syntax

fcstat [ -z [ -d | -c ] | -d | -e [ -d | -c ] | -c ] Device_Name

Description

The fcstat command displays the statistics that are gathered by the specified Fibre Channel device driver. You can also specify that the device-specific statistics are displayed in addition to the device-generic statistics. If you specify no flags, the fcstat command displays only the device-generic statistics. The fcstat command collects the statistics by using the following procedure:
  1. Opens the message catalog of fcstat and checks the parameter list.
  2. Accesses the Object Data Manager (ODM) database for information that relates to the selected adapter.
  3. Accesses the ODM database for information that relates to ports of the selected adapter.
  4. Opens and accesses adapter statistics.
  5. Resets some of the statistics if you specify the -z flag.
  6. 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 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.

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.
-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.

Statistics fields

Note: Some adapters might not support a specific statistic. The value of statistic fields that are not supported is always 0. All the parameters marked with the asterisk (*) are reset to their initial values when you use the fcstat command with the –z flag.

The statistic fields that are displayed in the output of the fcstat command and their descriptions follow:

  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.
  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

  1. To display the statistics for Fibre Channel device driver fcs0, enter:
    fcstat fcs0
    An output that is similar to the following example is displayed:
    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  

Location

/usr/sbin/fcstat