Fortinet black logo

Devices Managed by FortiOS

Displaying, resetting, and restoring port statistics

Copy Link
Copy Doc ID 8f3df6f8-7879-11eb-9995-00505692583a:801198
Download PDF

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 of a managed FortiSwitch unit:

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: roort

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 of a managed FortiSwitch unit:

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

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 of a managed FortiSwitch unit:

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: roort

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 of a managed FortiSwitch unit:

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