Fortinet black logo

Administration Guide

Displaying, resetting, and restoring port statistics

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:
  1. Go to Switch Controller > FortiSwitch Ports.

  2. Select a port.

  3. Click View Statistics.

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

diagnose switch-controller switch-info port-stats S524DF4K15000024 port8

To reset the port statistics counters using the GUI:
  1. Go to Switch Controller > FortiSwitch Ports.

  2. Select a port.

  3. Click View Statistics.

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

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 FortiSwitch Manager. 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:

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 using the GUI:
  1. Go to Switch Controller > FortiSwitch Ports.

  2. Select a port.

  3. Click View Statistics.

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

diagnose switch-controller switch-info port-stats S524DF4K15000024 port8

To reset the port statistics counters using the GUI:
  1. Go to Switch Controller > FortiSwitch Ports.

  2. Select a port.

  3. Click View Statistics.

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

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 FortiSwitch Manager. 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:

diagnose switch-controller trigger restore-hardware-counters S524DF4K15000024 port10-port11,internal