Displaying, resetting, and restoring port statistics
For the following commands, if the managed FortiSwitch unit is not specified, the command is applied to all ports of all managed FortiSwitch units.
To display port statistics using the GUI:
-
Go to WiFi & Switch Controller > FortiSwitch Ports.
-
Select a port.
-
Click View Statistics.
-
Click the Traffic tab to see transmitted and received traffic and transmitted and received frames. Click the Issues tab to see frame errors by type.
To display port statistics using the CLI:
diagnose switch-controller switch-info port-stats <managed FortiSwitch device ID> <port_name>
For example:
FG100D3G15817028 (global) # diagnose switch-controller switch-info port-stats S524DF4K15000024 port8
Vdom: dmgmt-vdom
Vdom: root
Vdom: root
S524DF4K15000024:
Port(port8) is Admin up, line protocol is down
Interface Type is Serial Gigabit Media Independent Interface(SGMII/SerDes)
Address is 08:5B:0E:F1:95:ED, loopback is not set
MTU 9216 bytes, Encapsulation IEEE 802.3/Ethernet-II
half-duplex, 0 Mb/s, link type is auto
input : 0 bytes, 0 packets, 0 errors, 0 drops, 0 oversizes
0 unicasts, 0 multicasts, 0 broadcasts, 0 unknowns
output : 0 bytes, 0 packets, 0 errors, 0 drops, 0 oversizes
0 unicasts, 0 multicasts, 0 broadcasts
0 fragments, 0 undersizes, 0 collisions, 0 jabbers
Vdom: vdom-1
To reset the port statistics counters using the GUI:
-
Go to WiFi & Switch Controller > FortiSwitch Ports.
-
Select a port.
-
Click View Statistics.
-
Click Reset Port Statistics.
To reset the port statistics counters using the CLI:
diagnose switch-controller trigger reset-hardware-counters <managed FortiSwitch device ID> <port_name>
For example:
FG100D3G15817028 (global) # diagnose switch-controller trigger reset-hardware-counters S524DF4K15000024 1,3,port6-7
NOTE: This command is provided for debugging; accuracy is not guaranteed when the counters are reset. Resetting the counters might have a negative effect on monitoring tools, such as SNMP and FortiGate. The statistics gathered during the time when the counters are reset might be discarded.
To restore the port statistics counters of a managed FortiSwitch unit:
diagnose switch-controller trigger restore-hardware-counters <managed FortiSwitch device ID> <port_name>
For example:
FG100D3G15817028 (global) # diagnose switch-controller trigger restore-hardware-counters S524DF4K15000024 port10-port11,internal