vfcstat Command
Purpose
Displays information about Virtual Fibre Channel (VFC) client adapters such as statistics, status, and activities.
Syntax
vfcstat -d vfc_client_adapter [ -f function_name ]
vfcstat -d vfc_client_adapter -e [ -z ]
vfcstat -d vfc_client_adapter [ -s [ -z ] ] [ -c no_of_times_to_run [ -i intervel_sec] ] [ -F ]
Description
The vfcstat command reports information such as virtual FC adapter state, status, NPort ID, I/O queues information, read/write statistics, binding information with the host (VIOS), link errors, path timeouts, and so on. The required information is fetched in real time and displayed in the output. You can reset some of the details such as statistics and error counts. You can also retrieve read/write statistics in formatted output for scripting purposes by using the -F option. The vfcstat command displays the statistics in a specified time interval for the specific number of times. The vfcstat command works on virtual FC client adapter only.
Flags
- -c no_of_times_to_run
- Specifies the number of times that the vfcstat command must be run when you specify the stats function. Valid values are in the range 1 - 86400.
- -d vfc_client_adapter
- Specifies the name of the virtual FC client adapter.
- -e
- Displays error counts for link and path timeout events.
- -f function_name
- Specifies the function to display the output. For a list of functions that are available for a virtual FC client adapter, see Example 2.
- -F
- Displays formatted statistic output.
- -h
- Displays usage and help information.
- -i intervel_sec
- Specifies the interval between multiple executions of the vfcstat command. Valid values are in the range 1 - 86400 seconds. The default value is 1 second.
- -l
- Lists all virtual FC client adapters.
- -s
- Displays read/write statistics.
- -z
- Resets statistics or error count metrics.
Examples
- To list all the virtual FC client adapters, enter the following
command:
# vfcstat -l
The output might be similar to the following example:fcs0 fcs1
- To list all the functions available for a specific virtual FC adapter,
enter the following command:
The output might be similar to the following example:# vfcstat -d fcs0
activity capabilities hostinfo link nport_id status tunables wwpn
- To display the status of a specific virtual FC adapter, enter the following
command:
The output might be similar to the following example:# vfcstat -d fcs0 -f status
State 0x10 (ONLINE) Opened true cfg_opn_state 0x0 prev_cfg_channels 0 flags 0x1400 ( UP_AFTER_LPM, SCSI_FLOGIN ) total_io_dma_size 0x20000000 total_dma_size_used 0x19900000 no_chs_reason_code 0x0 ( N/A ) migrated_count 0 online_time 61925950 (lbolt) UP time 498417 sec ( 5 days 18 hours 26 minutes 57 seconds ) Admin Queue active_cmds 0 spl_active_cmds 0 pending_cmds 0 spl_pending_cmds 0 resp_cmds 0 SCSI Queue #1 active_cmds 0 spl_active_cmds 0 pending_cmds 0 spl_pending_cmds 0 resp_cmds 0 ... ...
- To display statistics of a specific virtual FC adapter, enter the following
command:
The output might be similar to the following example:# vfcstat -d fcs0 -s
Current time : May 15 2023, 01:33:13.644 Time since last reset : 499015 sec ( 5 days 18 hours 36 minutes 55 seconds ) SCSI Queue #1 Read reqs : 128 Read bytes : 10204 Write reqs : 29 Write bytes : 21034 No DMA res count : 2 No SGE count : 2 h_send_dropped : 1 h_send_busy : 1 No cmd res count : 3 SCSI Queue #2 Read reqs : 99 Read bytes : 17695 Write reqs : 44 Write bytes : 24125 ... ... NVMe Queue #1 Read reqs : 990 Read bytes : 107695 Write reqs : 84 Write bytes : 234125 Domain Ceiling exceed count : 1 No SGE count : 2 h_send_dropped : 4 h_send_busy : 1 No cmd res count : 3
- To display statistics of a specific virtual FC client adapter in a formatted output, enter the
following command:
The output might be similar to the following example:# vfcstat -d fcs0 -s -F
Current time=May 15 2023, 01:35:02.284 Time since last reset=499124 sec ( 5 days 18 hours 38 minutes 44 seconds ) Queue_Start Domain=SCSI Queue number=1 Read reqs=128 Read bytes=10204 Write reqs=29 Write bytes=21034 No DMA res count=2 No SGE count=2 h_send_dropped =1 h_send_busy=1 No cmd res count=3 Queue_End Queue_Start Domain=SCSI Queue number=2 Read reqs=99 Read bytes=17695 Write reqs=44 Write bytes=24125 ... ... ... Queue_End ... ... Queue_Start Domain=NVMeOF Queue_number=1 Read reqs=990 Read bytes=107695 Write reqs=84 Write bytes=234125 Domain Ceiling exceed count=1 No SGE count=2 h_send_dropped=4 vfchost_resource_closed h_send_busy=1 No cmd res count=3 Queue_End
- To display statistics of a specific virtual FC client adapter in every 10 seconds for 5 times,
enter the following command:
# vfcstat -d fcs0 -s -c 5 -i 10
- To reset all fields in the stats function for a specific virtual FC adapter, enter the following
command:
# vfcstat -d fcs0 -s -z
- To display error counts for a specific virtual FC adapter, enter the following
command:
The output might be similar to the following example:# vfcstat -d fcs0 -e
Current time : Mar 17 2023, 14:28:23.854 Time since last reset : 33041 sec ( 9 hours 10 minutes 41 seconds ) Link Errors: Total errors: 4 Last 10 minutes: 1 Last 60 minutes: 2 Last 24 hours: 4 Path Timeouts: Domain: Admin Total timeouts: 6 Last 10 minutes: 1 Last 60 minutes: 2 Last 24 hours: 6 Path Timeouts: Domain: SCSI Total timeouts: 2 Last 10 minutes: 0 Last 60 minutes: 1 Last 24 hours: 2 Path Timeouts: Domain: NVMeOF Total timeouts: 5 Last 10 minutes: 1 Last 60 minutes: 2 Last 24 hours: 5
File
Item | Description |
---|---|
/usr/bin/vfcstat | Contains the vfcstat command. |