# Internals

## **Configuration Files**

***

The agent stores its configuration on the hidden directory **`.datasentinel`** located in the user’s home directory.

2 files are present:

* `agent.yml`
* `connections.yml`

{% hint style="info" %}
You can modify the agent properties directly through these files (except for passwords, which are encrypted).
{% endhint %}

## **Logs**

***

The agent’s actions are recorded in the `datasentinel.log` file located in the **`log`** subdirectory of its distribution.

The log file is automatically rotated to remove outdated entries and manage data retention.

By default, the log level is set to INFO. To increase the log level, one can set it to debug in the **`agent`** section of the configuration file `agent.yml`.

## **Internal Limits**

***

> The agent has limits in place to control its consumption and prevent excessive overhead.

### **Memory usage**

Memory consumption of the agent is checked every 15 minutes. If it exceeds the defined limit (2 gigabytes by default) for any reason (which should never append) , the agent stops and notifies the platform of its shutdown. A line is also added to its log file.

You can control this memory limit by setting the **`max-memory-mb`** parameter in the agent’s configuration file and restarting the agent for the changes to take effect.

```json
{
  "version": "3.2.0",
  "port": 8282,
  "max-memory-mb": 1024,
  "last_upload": "",
  "collection-rate": "high",
  "tables-monitoring-limit": 3000,
  "query-monitoring-limit": 30000,
  "sql-max-size": 312000,
  "start_time": "2020-10-23 15:43:23",
  "proxy": {
    "host": "",
    "port": 0,
    "user": "",
    "password": ""
  },
  "upload_server": {
    "host": "51.158.105.50",
    "port": 443
  },
  "connections": {
    "connections": 1,
    "running": 1,
    "not running": 0
  }
}
```


---

# 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://docs.datasentinel.io/manual/implementation/agent-usage/internals.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.
