summaryrefslogtreecommitdiff
path: root/docs/_rst_legacy/troubleshooting/rst-terminal.rst
blob: fb19773036d67f9ef23781b9c84ea00c2bb80752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
################
Terminal/Console
################

Sometimes you need to clear counters or statistics to troubleshoot better.

To do this use the ``clear`` command in Operational mode.

to clear the console output

.. code-block:: none

  vyos@vyos:~$ clear console

to clear interface counters

.. code-block:: none

  # clear all interfaces
  vyos@vyos:~$ clear interface ethernet counters
  # clear specific interface
  vyos@vyos:~$ clear interface ethernet eth0 counters

The command follows the same logic as the ``set`` command in configuration mode.

.. code-block:: none

  # clear all counters of an interface type
  vyos@vyos:~$ clear interface <interface_type> counters
  # clear counter of an interface in interface_type
  vyos@vyos:~$ clear interface <interface_type> <interface_name> counters


to clear counters on firewall rulesets or single rules

.. code-block:: none

  vyos@vyos:~$ clear firewall name <ipv4 ruleset name> counters
  vyos@vyos:~$ clear firewall name <ipv4 ruleset name> rule <rule#> counters

  vyos@vyos:~$ clear firewall ipv6-name <ipv6 ruleset name> counters
  vyos@vyos:~$ clear firewall ipv6-name <ipv6 ruleset name> rule <rule#> counters