mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 15:46:57 +01:00
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
//Module included in the following assemblies:
|
|
//
|
|
// observability/network_observability/netobserv_cli/netobserv-cli-using.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="network-observability-cli-capturing-packets_{context}"]
|
|
= Capturing packets
|
|
You can capture packets using the Network Observability CLI.
|
|
|
|
.Prerequisites
|
|
* Install the {oc-first}.
|
|
* Install the Network Observability CLI (`oc netobserv`) plugin.
|
|
|
|
.Procedure
|
|
. Run the packet capture with filters enabled:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc netobserv packets tcp,80
|
|
----
|
|
. Add filters to the `live table filter` prompt in the terminal to refine the incoming packets. An example filter is as follows:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
live table filter: [SrcK8S_Zone:us-west-1b] press enter to match multiple regular expressions at once
|
|
----
|
|
. To stop capturing, press kbd:[Ctrl+C].
|
|
. View the captured data, which is written to a single file in an `./output/pcap` directory located in the same path that was used to install the CLI:
|
|
.. The `./output/pcap/<capture_date_time>.pcap` file can be opened with Wireshark. |