> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ditto.live/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting System Information

> Query runtime diagnostics and observability data about your Ditto instance using the system:system_info collection.

Ditto provides a read-only system collection `system:system_info` that exposes diagnostic and observability data about your Ditto instance. This collection logs key-value pairs with timestamps, allowing you to query runtime information, configuration, and performance metrics.

<Info>
  The `system:system_info` collection is available in Ditto SDK version 4.13.0 and later.
</Info>

<Warning>
  Observers registered against `system:system_info` execute every 500ms regardless of whether data has changed. Consider the performance implications before registering observers on system collections, especially on resource-constrained devices.
</Warning>

## Querying system information

Query the collection using standard DQL:

```sql theme={null}
SELECT * FROM system:system_info
```

You can filter by specific keys or namespaces:

```sql theme={null}
SELECT * FROM system:system_info
WHERE key LIKE 'collection_num_docs%'
```

## Available information

The `system:system_info` collection tracks various categories of information organized by namespace.

### SDK metadata

SDK version, commit hash, language, and platform information.

| Key                  | Namespace | Description                                    |
| -------------------- | --------- | ---------------------------------------------- |
| `ditto_sdk_version`  | core      | SDK version number                             |
| `ditto_sdk_commit`   | core      | Git commit hash                                |
| `ditto_sdk_language` | core      | SDK language (Swift, Kotlin, JavaScript, etc.) |
| `ditto_sdk_platform` | core      | Operating system platform                      |

**Example response:**

```json theme={null}
{
  "key": "ditto_sdk_version",
  "namespace": "core",
  "timestamp": 1762469332,
  "value": "4.13.0"
}
```

### Filesystem metrics

Total device storage and available space, plus storage usage broken down by component.

| Key                    | Namespace | Description                          |
| ---------------------- | --------- | ------------------------------------ |
| `fs_device_available`  | core      | Available device storage in bytes    |
| `fs_device_total`      | core      | Total device storage in bytes        |
| `fs_usage_store`       | core      | Storage used by the document store   |
| `fs_usage_attachment`  | core      | Storage used by attachments          |
| `fs_usage_replication` | core      | Storage used by replication metadata |
| `fs_usage_auth`        | core      | Storage used by authentication data  |
| `fs_usage_total`       | core      | Total storage used by Ditto          |

### Transport configuration

Complete snapshot of enabled transports and their settings.

```json theme={null}
{
  "key": "transport_config",
  "namespace": "core",
  "timestamp": 1762468011,
  "value": {
    "peer_to_peer": {
      "bluetooth_le": { "enabled": true },
      "lan": { "enabled": true, "mdns_enabled": true }
    }
  }
}
```

### System parameters

Non-default configuration parameters and collection sync scopes.

| Key                                     | Namespace | Description                                     |
| --------------------------------------- | --------- | ----------------------------------------------- |
| `non_default_system_parameter[<param>]` | core      | Any system parameter set to a non-default value |

**Example:**

```json theme={null}
{
  "key": "non_default_system_parameter[user_collection_sync_scopes]",
  "namespace": "core",
  "timestamp": 1762468011,
  "value": {
    "local_orders": "LocalPeerOnly",
    "shared_data": "AllPeers"
  }
}
```

### Store metrics

Document counts per collection.

| Key                                 | Namespace | Description                                     |
| ----------------------------------- | --------- | ----------------------------------------------- |
| `collection_num_docs[<collection>]` | store     | Number of documents in the specified collection |

**Example:**

```json theme={null}
{
  "key": "collection_num_docs[orders]",
  "namespace": "store",
  "timestamp": 1762469342,
  "value": 5030
}
```

### Active subscriptions

Local subscriptions currently registered.

| Key                           | Namespace   | Description               |
| ----------------------------- | ----------- | ------------------------- |
| `local_subscriptions[<UUID>]` | replication | Active subscription query |

**Example:**

```json theme={null}
{
  "key": "local_subscriptions[123e4567-e89b-12d3-a456-426614174000]",
  "namespace": "replication",
  "timestamp": 1762469332,
  "value": {
    "query": "SELECT * FROM orders WHERE status = :status",
    "params": { 
      "status": "pending" 
    }
  }
}
```

### Connectivity

Active peer connections by transport type and cloud connection status.

| Key                           | Namespace | Description                               |
| ----------------------------- | --------- | ----------------------------------------- |
| `connections_bluetooth`       | presence  | Number of active Bluetooth connections    |
| `connections_lan`             | presence  | Number of active LAN connections          |
| `connections_p2pwifi`         | presence  | Number of active P2P WiFi connections     |
| `connections_websocket`       | presence  | Number of active WebSocket connections    |
| `connections_accesspoint`     | presence  | Number of active access point connections |
| `is_connected_to_ditto_cloud` | presence  | Whether connected to Ditto Cloud          |
| `device_name`                 | presence  | Device name                               |

### Logging configuration

Current logging settings.

| Key             | Namespace | Description                                  |
| --------------- | --------- | -------------------------------------------- |
| `enabled`       | logs      | Whether logging is enabled                   |
| `minimum_level` | logs      | Minimum log level (DEBUG, INFO, WARN, ERROR) |

### Tombstone reaper

Information about deleted document cleanup.

| Key                     | Namespace | Description                        |
| ----------------------- | --------- | ---------------------------------- |
| `last_reap_time`        | reaper    | Timestamp of last reaper execution |
| `num_tombstones_reaped` | reaper    | Number of tombstones cleaned up    |

## Use cases

The `system:system_info` collection is useful for:

* **Debugging**: Understand your Ditto instance configuration at runtime
* **Monitoring storage usage**: Track disk space consumption by component
* **Verifying configuration**: Confirm transport settings and system parameters
* **Observability**: Monitor connection counts and sync status
* **Diagnostics**: Gather information for troubleshooting issues

## Related documentation

* [Remote Observability](/sdk/latest/deployment/device-observability-and-ditto-logs) - Device dashboard and small peer info
* [SDK Logging](/sdk/latest/deployment/logging) - Configure logging settings
* [Troubleshooting](/sdk/latest/deployment/troubleshooting) - Debug common issues
