# R82 CLI Reference Guide

## connview

### Description

A tool for advanced troubleshooting that shows information about the current connections through the Security Gateway that works in the User Space Firewall (USFW, see [sk167052](https://support.checkpoint.com/results/sk/sk167052)).

This tool shows the consolidated information about connections from various Check Point modules that processed these connections (Firewall, Streaming, Parsers, Connection Tracker, and so on).

This tool gets the data about connections from all CoreXLFirewall instances in parallel, and in small quick chunks, so the packet flow is not blocked.

|     |     |
| --- | --- |
|  | Notes:

- You can run this command in Gaia Clish or in the Expert mode.
- On Scalable Platforms, you must connect to the Gaia Portal of the applicable Security Group.
- On a VSNextGateway / Legacy VSX Gateway, you must run this command in the context of the applicable Virtual Gateway / Virtual System:

|     |
    | --- |
    | `vsenv <ID>` |

- You can also run the corresponding Gaia API command.

See one of these Gaia API References:
  - Online _[Check Point Gaia API Reference](https://sc1.checkpoint.com/documents/latest/GaiaAPIs/index.html)_ (at the top, select the correct version) v1.8 and higher - section "Diagnostics" > section"Connections" > command "`show-connections`".

- Local Gaia API Reference (v1.8 and higher) on your Gaia server:

`https://<IP Address of Gaia Server>/gaia_docs/#web/show-connections`
- This tool saves its logs in the `$FWDIR/log/connview.elg` file.

In addition, refer to log entries "`connview`" in the `$FWDIR/log/fwk.elg` file. |

### Syntax for Gaia Clish

|     |
| --- |
| `show connview [{summary | history | verbose}]` |

### Syntax for the Expert mode

|     |
| --- |
| `[Expert@GW:0]# connview {-h | -? | --help}` |
| `[Expert@GW:0]# connview --usage` |
| `[Expert@GW:0]# connview <Parameter> [{summary | verbose | history}]` |

### Parameters

| Parameter | Description |
| --- | --- |
| `-h`<br>`-?`<br>`--help` | Shows the complete built-in help. |
| `--usage` | Shows the shortened built-in help. |
| `--adv-filter=<Component>:<Field>=<Value>` | Filters the connections by the value of a specific field in a reporting component (`Conn Stats`, `PSL`, `MUX`, `WS`, and so on).<br>For the full list, run:<br>`connview --adv-filter -h`<br>Example for querying the component "`Conn Stats`", whose field "`Is Heavy Conn`" contains the value "`Yes`":<br>`connview --adv-filter=conn_stats:is_heavy_conn=yes` |
| `-c <Component1>,<Component2>,...,<ComponentN>`<br>`--component=<Component1>,<Component2>,...,<ComponentN>` | Filters the connections by the specified components (`Conn Stats`, `PSL`, `MUX`, `WS`, and so on).<br>For the full list, run:<br>`connview -c -h`<br>Example for querying the components "`Application Control`" and "`HTTPS Inspection`":<br>`connview -c application_control,httpsi` |
| `--src=<IP Address>` | Filters the connections by the specified source IP address. |
| `--src-port=<Port Number>` | Filters the connections by the specified source port number.<br>See _[IANA Service Name and Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml)_. |
| `--dst=<IP Address>` | Filters the connections by the specified destination IP address. |
| `--dst-port=<Port Number>` | Filters the connections by the specified destination port number.<br>See _[IANA Service Name and Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml)_. |
| `--format={text | json}` | Specifies the output format - text (default) or JSON. |
| `--ip-prot=<Protocol Number>` | Filters the connections by the specified protocol number.<br>See _[IANA Protocol Numbers](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)_. |
| `--ip-ver={v4 | v6}` | Filters the connections by the specified IP version - IPv4 or IPv6.<br>By default, this tool shows IPv4 and IPv6 connections. |
| `-i <ID1>,<ID2>,...<IDn>`<br>`--instance-id=<ID1>,<ID2>,...<IDn>` | Filters the connections by the specified CoreXL Firewall instances.<br>To see the IDs of CoreXL Firewall instances, run:<br>`fw ctl multik stat`<br>`fw6 ctl multik stat` |
| `-m {all | <Number>}`<br>`--max-results={all | <Number>}` | Specifies the number of first connections to show for each CoreXL Firewall instance.<br>- The value "`all`" shows all connections.<br>  <br>  May increase memory and CPU load.<br>  <br>- Default: 5 connections for each CoreXLFirewall instance. |
| `-p <Preset1>,<Preset2>,...,<PresetN>`<br>`--preset=<Preset1>,<Preset2>,...,<PresetN>` | Applies a predefined configuration to this command to run a predefined syntax for various query scenarios.<br>For the full list, run:<br>`connview -p -h`<br>Example for querying the presets for "`conn_keys`" and "`heavy`":<br>`connview -p conn_keys,heavy` |
| `--vs={all | <ID>}` | Filters the connections by the specified virtual context ID.<br>If you do not specify this parameter, the this tool shows the data only for the current virtual context.<br>- In the VSNext mode:<br>  <br>  Filters the connections by the specified Virtual Gateway ID.<br>  <br>  To see the IDs of Virtual Gateways, run one of these:<br>  - In Gaia Clish:<br>    <br>    `show vsnext overview virtual-systems`<br>    <br>  - Gaia API:<br>    <br>    `show-virtual-gateways`<br>- In the Traditional VSX mode:<br>  <br>  Filters the connections by the specified Virtual System ID.<br>  <br>  To see the IDs of Virtual Systems, run one of these:<br>  - In the Expert mode:<br>    <br>    `vsx stat -v`<br>    <br>    `vsx stat -l`<br>    <br>  - In Gaia Clish:<br>    <br>    `show virtual-system all` |
| `{summary | verbose | history}` | Optional. Specifies the output verbosity:<br>- `summary`<br>  <br>  Shows only a short summary.<br>  <br>- `verbose`<br>  <br>  Shows all information.<br>  <br>- `history`<br>  <br>  Shows the history information (collected by the [tp\_collector\_cli](https://sc1.checkpoint.com/documents/R82/WebAdminGuides/EN/CP_R82_CLI_ReferenceGuide/Content/Topics-CLIG/FWG/tp_collector_cli.htm) tool).<br>  <br>  The "`Event Report Time`" is the time when the record was last updated.<br>  <br>  Usually, a record is updated at the end (or close to the end) of the connection.<br>  <br>  The history information is limited by the data files `$FWDIR/log/tp_collector.dat` (by default, a maximum of 10 files, 20 MB each file, update cyclically.). |

### Example 1 - Verbose output (this is the default level)

|     |
| --- |
| ```<br>[Expert@GW:0]# connview<br>... ... ...<br>Connection Key: 192.168.22.33:42516 -> 172.16.44.55:80 IPP 6<br>Instance: 12<br>Conn Stats<br>        Create Time: 2024-09-13 12:12:09        Last Packet Time: 2024-09-13 12:12:09<br>        Is Accelerated: Yes                     Reason: Failed to get native SXL device<br>        Is Fast Accel: No                       Is Heavy Conn: No<br>        Total Packets: 3                        Total Bytes: 132<br>        CPU Util.<br>                FW Instance Load: 0%    PPE WT Load: 0%<br>PSL<br>        Path: Pipeline processing       Flags: 0x4005301<br>        InZone: INTERNAL_ZONE           OutZone: INTERNAL_ZONE<br>        C2S Side<br>                TCP State<br>                        State: PSL_TCP_ESTABLISHED      Number of segments: 0<br>                        Hold: 0                         Side flags: 0x124<br>        S2C Side<br>                TCP State<br>                        State: PSL_TCP_ESTABLISHED      Number of segments: 0<br>                        Hold: 0                         Side flags: 0x20<br>        Application info<br>                MUX_PASSIVE Flags: 0x13<br>MUX<br>        Mux opaque: 0x7fb0066a2c08<br>        Info<br>                Streaming Mode: PSL     Num of registered apps: 3<br>                Ref count: 2            Mux state flags: VM_CONN_WAS_SET, INSPECT_C2S, INSPECT_S2C<br>                PPE<br>                        Inflight messages: 0    PSL jobs: 0<br>                        PM jobs: 0              MD5 jobs: 0<br>                        CIFS jobs: 0<br>                Bytes Stats<br>                        S2C Pending data: No    C2S Pending data: No<br>                        Read bytes: 0           Write bytes: 0<br>                        Skip bytes: 0           Pending bytes: 0<br>                Apps<br>                        PARSERS_IS<br>                                C2S byte skip: 0        S2C byte skip: 0<br>                                Read bytes: 0           Write bytes: 0<br>                                App flags: INSPECT_BOTH<br>                        WS<br>                                C2S byte skip: 0        S2C byte skip: 0<br>                                Read bytes: 0           Write bytes: 0<br>                                App flags: INSPECT_BOTH<br>                        ADVP<br>                                C2S byte skip: 0        S2C byte skip: 0<br>                                Read bytes: 0           Write bytes: 0<br>                                App flags: INSPECT_BOTH<br>WS<br>        Packets counter: 0                      Connection type: 0<br>        Apps in exception: 35184372086772<br>ADVP<br>        Opaque: 0x7fb006b0e988  Flags: 0x84<br>        Contexts Status<br>                Is C2S HS Context Active: Yes   Is S2C HS Context Active: Yes<br>                Is C2S RAW Context Active: No   Is S2C RAW Context Active: No<br>                Is C2S DATA Context Active: Yes Is S2C DATA Context Active: No<br>        Client Stream<br>                Packet Index: 0 Stream Length: 0<br>        Server Stream<br>                Packet Index: 0 Stream Length: 0<br>Policy Info<br>        Access rulebase<br>                Matched Access Rule number: 1<br>Connection Tracker<br>        Flags: 0        Resource: N/A<br>        | TS                  | Point ID                              | Severity | Opaque |<br>        ------------------------------------------------------------------------------------<br>        | 2024-09-13 12:12:09 | Connection created from template      | INFO     | 0      |<br>        | 2024-09-13 12:12:09 | cpxl_chain_handler                    | INFO     | 0      |<br>        | 2024-09-13 12:12:09 | PSL in Pipeline Processing path       | INFO     | 0      |<br>        | 2024-09-13 12:12:09 | OSP: Will calculate backup member now | INFO     | 0      |<br>        | 2024-09-13 12:12:09 | cpxl_chain_handler                    | INFO     | 0      |<br>        | 2024-09-13 12:12:09 | PSL in Pipeline Processing path       | INFO     | 0      |<br>        | 2024-09-13 12:12:12 | OSP: Will calculate backup member now | INFO     | 0      |<br>        | 2024-09-13 12:12:12 | OSP: Will calculate backup member now | INFO     | 0      |<br>... ... ...<br>[Expert@GW:0]#<br>``` |

### Example 2 - Summary output

|     |
| --- |
| ```<br>[Expert@GW:0]# connview summary<br>Conn Stats<br>        Total Connections: 5031 Total Heavy Connections: 0<br>MUX<br>        Total connections: 2074         Accelerated pipeline path connections: 1710<br>        Medium path connections: 0      Slow path connections: 364<br>[Expert@GW:0]#<br>``` |

### Example 3 - History output (limited to 2 connections)

|     |
| --- |
| ```<br>[Expert@GW:0]# connview -m 2 history<br>Connection Key: 192.168.22.33:27363 -> 172.16.44.55:53 IPP 17<br>Instance: 0<br>Event Report Time: 09/12 10:15:44<br>Session: 0<br>MALWARE_RES_REP<br>        Context: 202                    RAD Cache Miss: Yes<br>        RAD Timeout: 10:15:44           Rad Query Failure: Yes<br>        Session ended with error: Yes   url: www.somedomainname.com<br>Connection Key: 192.168.22.34:27351 -> 172.16.44.55:53 IPP 17<br>Instance: 9<br>Event Report Time: 09/12 10:15:44<br>Session: 0<br>MALWARE_RES_REP<br>        Context: 202                    RAD Cache Miss: Yes<br>        RAD Timeout: 10:15:44           Rad Query Failure: Yes<br>        Session ended with error: Yes   url: www.somedomainname.com<br>[Expert@GW:0]#<br>``` |
