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

# Get System Metrics

> Get current CPU, memory, and disk usage metrics for HopX sandboxes using the HopX VM Agent API. Monitor system resources in real-time, track performance metrics, and use data for optimization and troubleshooting. Learn how to use GET /system/metrics endpoint to retrieve comprehensive system information. Includes request examples and response formats.

Get current system metrics for the sandbox including CPU, memory, and disk usage.

## Endpoint

```
GET /system
```

## Request

### Headers

```
Authorization: Bearer YOUR_JWT_TOKEN
```

### Example Request

```bash theme={null}
curl https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
```

## Response

### Success (200 OK)

```json theme={null}
{
  "os": {
    "name": "Ubuntu 22.04.5 LTS",
    "version": "22.04.5 LTS (Jammy Jellyfish)",
    "kernel": "5.10.186",
    "arch": "amd64",
    "hostname": "169.254.0.22",
    "timezone": "Etc/UTC"
  },
  "hardware": {
    "cpu_cores": 2,
    "cpu_model": "AMD EPYC",
    "memory_mb": 1995,
    "disk_mb": 19987
  },
  "network": {
    "interfaces": [
      {
        "name": "eth0",
        "ip": "192.168.1.100",
        "mac": "02:fc:00:00:00:1c"
      }
    ],
    "hostname": "169.254.0.22"
  },
  "environment": {
    "shell": "",
    "path": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
    "user": "",
    "home": "",
    "working_dir": "/",
    "environment": {
      "LANG": "C.UTF-8",
      "TERM": "linux"
    }
  },
  "capabilities": [
    "Go",
    "Git",
    "Curl",
    "Nano",
    "Make",
    "Wget",
    "Vim",
    "Bash",
    "GCC",
    "Pip",
    "NPM",
    "Python",
    "Node.js"
  ]
}
```

### Response Fields

| Field | Type | Description |
| - | - | - |
| `os` | object | Operating system information |
| `os.name` | string | OS name and version |
| `os.kernel` | string | Kernel version |
| `os.arch` | string | System architecture |
| `hardware` | object | Hardware specifications |
| `hardware.cpu_cores` | integer | Number of CPU cores |
| `hardware.cpu_model` | string | CPU model |
| `hardware.memory_mb` | integer | Total memory in MB |
| `hardware.disk_mb` | integer | Total disk space in MB |
| `network` | object | Network configuration |
| `network.interfaces` | array | Network interfaces |
| `environment` | object | Environment configuration |
| `environment.path` | string | System PATH |
| `capabilities` | array | Installed software and tools |

## Status Codes

| Code | Description |
| - | - |
| 200 | Success |
| 401 | Unauthorized |

## Use Cases

### Get System Information

```bash theme={null}
curl -s https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | \
  jq '{os: .os.name, cpu_cores: .hardware.cpu_cores, memory_mb: .hardware.memory_mb}'
```

### Check Hardware Specs

```bash theme={null}
curl https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | \
  jq '.hardware'
```

### List Installed Capabilities

```bash theme={null}
curl https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | \
  jq '.capabilities[]'
```

### Check OS Version

```bash theme={null}
OS=$(curl -s https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | jq -r '.os.name')

echo "Operating System: $OS"
```

### Get Network Configuration

```bash theme={null}
curl https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | \
  jq '.network.interfaces[]'
```

## Related

* **SDK**: [sandbox.get\_agent\_metrics()](https://docs.hopx.ai/sdk/python/sandbox.md#get_agent_metrics) - Python SDK method
* [CLI System Commands](https://docs.hopx.ai/cli/commands/system.md) - System operations from CLI

## Next Steps

* **[Get Cache Statistics](https://docs.hopx.ai/api/vm-agent/get-cache-stats.md)** - View cache metrics
* **[List Processes](https://docs.hopx.ai/api/vm-agent/list-system-processes.md)** - View running processes


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.