# Collecting system information

## Collect Logs when you contact us

If our troubleshooting guide and our support pages do not resolve your issue, and you need to contact Network Optix Support, please send us a log package from your server.

Don’t worry, you don’t need advanced command line knowledge. Just follow the following steps exactly.

{% tabs %}
{% tab title="Linux" %}
**Step 1: Log in to your server**

* Open a terminal (Mac/Linux) or PuTTY (Windows).
* Connect using the login details we gave you. For example:

```bash
ssh user@SERVER_IP
```

***

**Step 2: Put the logger.sh script on your server**

{% file src="/files/HxjSKASWmEHBZsAxU47W" %}

* Save the above **`logger-4.7.1.sh`** file to your computer and rename it to **`logger.sh`**.
* Upload it to your server’s home folder:
  * On **Mac/Linux**:

    ```bash
    scp logger.sh user@SERVER_IP:~
    ```
  * On **Windows**: use **WinSCP** (drag and drop) or **pscp**.

***

**Step 3: Allow the script to run**

On the server, type:

```bash
chmod +x logger.sh
```

***

**Step 4: Run the script**

Start the logger:

```bash
./logger.sh
```

The script will run for a minute or two.\
When finished, it will create this file on your server:

```
nxai_troubleshooting.tgz
```

***

**Step 5: Copy the log file back to your computer**

* On **Mac/Linux**:

  ```bash
  scp user@SERVER_IP:~/nxai_troubleshooting.tgz .
  ```
* On **Windows**: download the file with **WinSCP** or **pscp**.

***

**Step 6: Send it to Support**

Attach the file **`nxai_troubleshooting.tgz`** to a support ticket at [https://support.networkoptix.com](https://support.networkoptix.com/)

***

Done! You’ve now collected all the logs we need to help you quickly.
{% endtab %}

{% tab title="Windows" %}
**Step 1: Download the script**

Download the "**logger\_windows.ps1**" script (In this example the path `C:\Users\virtual\Downloads` is used, where the username is `virtual`. Please adjust these in the following code fragments for your own situation.

{% file src="/files/wkCY9E8AzfJgFxTqIeXt" %}

**Step 2: Run PowerShell**

Open PowerShell or PowerShell ISE **as administrator**.

<figure><img src="/files/yh29sDFQybRMcXuv2CKP" alt="Windows Start menu with PowerShell highlighted and Run as administrator option visible"><figcaption><p>Open PowerShell as administrator — required to run the logger script</p></figcaption></figure>

And go to the directory where you downloaded the system information script.

**Step 3: Run the logger script in PowerShell**

Run the logger script in the same PowerShell window.

```powershell
PowerShell -ExecutionPolicy Bypass -File .\logger_windows.ps1 
```

The script will run for a minute or two.

{% hint style="warning" %}
**Permission errors**

The script might fail with a message about missing permissions, use the [troubleshooting](#troubleshooting) steps below steps to check and fix these.
{% endhint %}

When finished, it will create a zip file with all the collected information in the user home directory on your server:

```ps1
C:\Users\virtual\nxai_troubleshooting.zip
```

**Step 4: Send the collected files to support**

Attach the file **`nxai_troubleshooting.zip`** to a support ticket at [https://support.networkoptix.com](https://support.networkoptix.com/)

Done! You’ve now collected all the logs we need to help you quickly.

***

**Troubleshooting**

**Check if the script may run with execution policy**

Check with `Get-ExecutionPolicy` if the Execution Policy allows scripts - it may show "*Restricted*" Which will mean no scripts are allowed.

```ps1
PS C:\Users\virtual\Downloads> Get-ExecutionPolicy
Restricted
```

**Set an execution policy so the script may run**

If the unblocking the script does not work you can try to set a new execution policy with `Set-ExecutionPolicy -Scope CurrentUser Bypass` and confirm that you want to change when prompted.

```ps1
PS C:\Users\virtual\Downloads> Set-ExecutionPolicy -Scope CurrentUser Bypass
```

If you check the Execution Policy after setting it, the new value should be "*Bypass*"

```ps1
PS C:\Users\virtual\Downloads> Get-ExecutionPolicy
Bypass
```

If setting a new policy does not work, contact your IT administrator to unblock the script for you.

This execution policy will not be reset when you close PowerShell so it it available the next time.
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nx.docs.scailable.net/nx-ai-manager-v6.1.2/support-and-troubleshooting/troubleshooting/collecting-system-information.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
