blob: 0d421972b0c3a81817bc38511100d69f41f00639 (
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
|
# 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
```none
vyos@vyos:~$ clear console
```
to clear interface counters
```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.
```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
```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
```
|