# Getting logs using the tcpdump application

**tcpdump** is a Linux utility for capturing and analyzing network traffic. It allows you to monitor packets passing through a network interface in real time and save them for further analysis.

## Capturing Logs with the tcpdump Application

1. Connect to your PBX via SSH (instructions [here](https://docs.mikopbx.com/mikopbx/english/faq/troubleshooting/connecting-to-a-pbx-using-ssh/putty)).
2. Run the following command:

```bash
tcpdump -i eth0 -n -s 0 -vvv -w /tmp/capturefilename.pcap
```

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F9q20YzF554AbGgfeZCys%2FfirstOutput.png?alt=media&#x26;token=5d49efbd-3add-4ee9-bd82-90d42beb8e62" alt=""><figcaption><p>Command in SSH connection</p></figcaption></figure>

3. Reproduce the issue by making a phone call. After the call, press **CTRL + C** in the SSH console to stop **tcpdump**.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FgWDZd8t6f9FfO9VdL45d%2FsecondOutput.png?alt=media&#x26;token=ebdaa567-c12a-430d-a402-230e7fc0a1b1" alt=""><figcaption><p>Command in SSH connection</p></figcaption></figure>

4. Connect to the PBX using WinSCP (instructions [here](https://docs.mikopbx.com/mikopbx/english/faq/troubleshooting/connecting-to-a-pbx-using-winscp)).
5. Send the log file **/tmp/capturefilename.pcap** to technical support.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F24rfAkrMZ08a8BySLaTv%2FfileWithLogs.png?alt=media&#x26;token=e3371938-43e0-4931-99ef-d5d05cec0e5c" alt=""><figcaption><p>File with logs</p></figcaption></figure>
