From 62131133e30c4c6521b729d420a9bee9fc45c20b Mon Sep 17 00:00:00 2001 From: rebortg Date: Tue, 2 Apr 2019 16:32:25 +0200 Subject: add clear command to troubleshooting.rst --- docs/troubleshooting.rst | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'docs/troubleshooting.rst') diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 71345074..a012cd20 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -161,6 +161,50 @@ The `unlimited` keyword is used to specify that an unlimited number of packets can be captured (by default, 1,000 packets are captured and you're returned to the VyOS command prompt). +Clear Command +------------- + +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:: sh + + vyos@vyos:~$ clear console + +to clear interface counters + +.. code-block:: sh + + # clear all interfaces + vyos@vyos:~$ clear interface ethernet counters + # clear specific interface + vyos@vyos:~$ clear interface ehternet eth0 counters + +The command follow the same logic as the ``set`` command in configuration mode. + +.. code-block:: sh + + # clear all counters of a interface type + vyos@vyos:~$ clear interface counters + # clear counter of a interface in interface_type + vyos@vyos:~$ clear interface counters + + +to clear counters on firewall rulesets or single rules + +.. code-block:: sh + + vyos@vyos:~$ clear firewall name counters + vyos@vyos:~$ clear firewall name rule counters + + vyos@vyos:~$ clear firewall ipv6-name counters + vyos@vyos:~$ clear firewall ipv6-name rule counters + + + .. _mtr: http://www.bitwizard.nl/mtr/ .. _tshark: https://www.wireshark.org/docs/man-pages/tshark.html .. _`PCAP filter expressions`: http://www.tcpdump.org/manpages/pcap-filter.7.html -- cgit v1.2.3 From 85039a1ab43ed6f4f7fd82ba535b001ec765a78f Mon Sep 17 00:00:00 2001 From: rebortg Date: Wed, 3 Apr 2019 19:08:17 +0200 Subject: improve monitor comman --- docs/troubleshooting.rst | 74 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 2 deletions(-) (limited to 'docs/troubleshooting.rst') diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index a012cd20..6c5d1ba5 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -85,8 +85,11 @@ Several options are available for changing the display output. Press `h` to invoke the built in help system. To quit, just press `q` and you'll be returned to the VyOS command prompt. -Monitoring Network Interfaces ------------------------------ +Monitoring +---------- + +Network Interfaces +^^^^^^^^^^^^^^^^^^ It's possible to monitor network traffic, either at the flow level or protocol level. This can be useful when troubleshooting a variety of protocols and @@ -161,6 +164,73 @@ The `unlimited` keyword is used to specify that an unlimited number of packets can be captured (by default, 1,000 packets are captured and you're returned to the VyOS command prompt). +Interface Bandwith +^^^^^^^^^^^^^^^^^^ + +to take a quick view on the used bandwith of an interface use the ``monitor bandwith`` command + +.. code-block:: sh + + vyos@vyos:~$ monitor bandwidth interface eth0 + +show the following: + +.. code-block:: sh + + eth0 bmon 3.5 + Interfaces │ RX bps pps %│ TX bps pps % + >eth0 │ 141B 2 │ 272B 1 + ───────────────────────────────┴───────────────────────┴──────────────────────────────────────────────────────────────── + B (RX Bytes/second) + 198.00 .|....|..................................................... + 165.00 .|....|..................................................... + 132.00 ||..|.|..................................................... + 99.00 ||..|.|..................................................... + 66.00 |||||||..................................................... + 33.00 |||||||..................................................... + 1 5 10 15 20 25 30 35 40 45 50 55 60 + KiB (TX Bytes/second) + 3.67 ......|..................................................... + 3.06 ......|..................................................... + 2.45 ......|..................................................... + 1.84 ......|..................................................... + 1.22 ......|..................................................... + 0.61 :::::||..................................................... + 1 5 10 15 20 25 30 35 40 45 50 55 60 + + ───────────────────────────────────────── Press d to enable detailed statistics ──────────────────────────────────────── + ─────────────────────────────────────── Press i to enable additional information ─────────────────────────────────────── + Wed Apr 3 14:46:59 2019 Press ? for help + +| Press ``d`` for more detailed informations or ``i`` for additional information. +| To exit press ``q`` and than ``y`` + +Interface performance +^^^^^^^^^^^^^^^^^^^^^ + +To take a look on the network bandwith between two nodes, the ``monitor bandwidth-test`` command is used to run iperf. + +.. code-block:: sh + + vyos@vyos:~$ monitor bandwidth-test + Possible completions: + accept Wait for bandwidth test connections (port TCP/5001) + initiate Initiate a bandwidth test + +| The ``accept`` command open a listen iperf server on TCP Port 5001 +| The ``initiate`` command conncet to this server. + +.. code-block:: sh + + vyos@vyos:~$ monitor bandwidth-test initiate + Possible completions: + Initiate a bandwidth test to specified host (port TCP/5001) + + + + + + Clear Command ------------- -- cgit v1.2.3 From 3b4e992346e0c6f8d75f9d283086922e3348f0af Mon Sep 17 00:00:00 2001 From: rebortg Date: Sun, 7 Apr 2019 21:33:40 +0200 Subject: add monitor command --- docs/troubleshooting.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'docs/troubleshooting.rst') diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 6c5d1ba5..04cb9d80 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -229,7 +229,31 @@ To take a look on the network bandwith between two nodes, the ``monitor bandwidt +Monitor command +^^^^^^^^^^^^^^^ +The ``monitor command`` command allows you to repeatedly run a command to view a continuously refreshed output. +The command is run and output every 2 seconds, allowing you to monitor the output continuously without having to re-run the command. This can be useful to follow routing adjacency formation. + +.. code-block:: sh + + vyos@router:~$ monitor command "show interfaces" + +Will clear the screen and show you the output of ``show interfaces`` every 2 seconds. + +.. code-block:: sh + + Every 2.0s: /opt/vyatta/bin/vyatta-op-cmd-wrapper s... Sun Mar 26 02:49:46 2019 + + Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down + Interface IP Address S/L Description + --------- ---------- --- ----------- + eth0 192.168.1.1/24 u/u + eth0.5 198.51.100.4/24 u/u WAN + lo 127.0.0.1/8 u/u + ::1/128 + vti0 172.32.254.2/30 u/u + vti1 172.32.254.9/30 u/u Clear Command ------------- -- cgit v1.2.3