openclaw - 💡(How to fix) Fix [Feature]: add `system.metrics` gateway method for remote system monitoring [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#60074Fetched 2026-04-08 02:36:46
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

Add a system.metrics gateway method that returns system information (CPU, GPU, memory, disk, network) from the host running the gateway. This enables clients to monitor the remote gateway's system resources.

Root Cause

Add a system.metrics gateway method that returns system information (CPU, GPU, memory, disk, network) from the host running the gateway. This enables clients to monitor the remote gateway's system resources.

Code Example

"system-presence": ({ respond }) => {
    respond(true, listSystemPresence(), void 0);
},

---

// Gateway method: system.metrics
// Returns system information from the gateway host

const metrics = await controlPlane.callGateway("system.metrics", {});

// Expected response shape:
{
  cpu: {
    name: string;           // e.g., "AMD Ryzen AI MAX+ PRO 395"
    cores: number;          // e.g., 16
    temperature: number;    // e.g., 42 (Celsius)
    usage: number;         // e.g., 7 (percentage)
    speed: number;         // e.g., 3400 (MHz)
  };
  gpu: {
    name: string;          // e.g., "AMD Radeon 8060S"
    usage: number;         // e.g., 2 (percentage)
    memoryTotal: number;   // e.g., 32768 (MB)
    memoryUsed: number;    // e.g., 912 (MB)
    computeUnits: number;  // e.g., 40
    driver: string;        // e.g., "6.17.0-1012-oem"
  };
  memory: {
    total: number;         // e.g., 96000 (MB)
    used: number;          // e.g., 19320 (MB)
    swapTotal: number;     // e.g., 8192 (MB)
    swapUsed: number;      // e.g., 0 (MB)
  };
  disk: {
    total: number;         // e.g., 1888256 (MB)
    used: number;          // e.g., 66948 (MB)
  };
  network: {
    rx: number;            // e.g., 2930000 (MB total received)
    tx: number;            // e.g., 2710000 (MB total transmitted)
  };
  platform: {
    type: string;          // e.g., "linux"
    arch: string;          // e.g., "x64"
    hostname: string;       // e.g., "server-host"
    uptime: number;        // e.g., 3600 (seconds)
  };
}
RAW_BUFFERClick to expand / collapse

Summary

Add a system.metrics gateway method that returns system information (CPU, GPU, memory, disk, network) from the host running the gateway. This enables clients to monitor the remote gateway's system resources.

Problem to solve

Clients connecting to a remote gateway cannot retrieve the host's system metrics. There is no gateway method to expose this information.

Currently, clients must call systeminformation locally, which only returns the client's own machine metrics - not the remote gateway's host metrics. This is particularly limiting for headless setups where operators run the gateway on remote machines (SSH, cloud instances) and want visibility into that host's resources.

Proposed solution

Add a system.metrics gateway method that returns system information from the gateway host. This would allow connected clients to retrieve remote system metrics through the existing gateway call mechanism.

Similar Existing Feature

The gateway already has a system-presence method that returns device/client presence information:

"system-presence": ({ respond }) => {
    respond(true, listSystemPresence(), void 0);
},

Proposed API

// Gateway method: system.metrics
// Returns system information from the gateway host

const metrics = await controlPlane.callGateway("system.metrics", {});

// Expected response shape:
{
  cpu: {
    name: string;           // e.g., "AMD Ryzen AI MAX+ PRO 395"
    cores: number;          // e.g., 16
    temperature: number;    // e.g., 42 (Celsius)
    usage: number;         // e.g., 7 (percentage)
    speed: number;         // e.g., 3400 (MHz)
  };
  gpu: {
    name: string;          // e.g., "AMD Radeon 8060S"
    usage: number;         // e.g., 2 (percentage)
    memoryTotal: number;   // e.g., 32768 (MB)
    memoryUsed: number;    // e.g., 912 (MB)
    computeUnits: number;  // e.g., 40
    driver: string;        // e.g., "6.17.0-1012-oem"
  };
  memory: {
    total: number;         // e.g., 96000 (MB)
    used: number;          // e.g., 19320 (MB)
    swapTotal: number;     // e.g., 8192 (MB)
    swapUsed: number;      // e.g., 0 (MB)
  };
  disk: {
    total: number;         // e.g., 1888256 (MB)
    used: number;          // e.g., 66948 (MB)
  };
  network: {
    rx: number;            // e.g., 2930000 (MB total received)
    tx: number;            // e.g., 2710000 (MB total transmitted)
  };
  platform: {
    type: string;          // e.g., "linux"
    arch: string;          // e.g., "x64"
    hostname: string;       // e.g., "server-host"
    uptime: number;        // e.g., 3600 (seconds)
  };
}

Impact

  • Use case: Monitoring headless gateway instances on remote machines
  • Severity: Medium - limits observability for remote setups
  • Frequency: Whenever system monitoring is needed for remote gateways
  • GPU support: Particularly important for AI/ML workloads where GPU metrics are essential

Additional information

Reference: This aligns with the pattern used by system-presence in the gateway command handler.

extent analysis

TL;DR

Implement a system.metrics gateway method to retrieve system information from the host running the gateway.

Guidance

  • To implement the system.metrics method, follow the pattern used by the existing system-presence method in the gateway command handler.
  • Use a library or module that provides system information, such as CPU, GPU, memory, disk, and network metrics, to gather the required data.
  • Ensure the method returns the expected response shape, including all the specified fields for each system component (e.g., CPU, GPU, memory, disk, network, platform).
  • Consider the security implications of exposing system metrics and ensure that the method is properly authenticated and authorized.

Example

"system.metrics": ({ respond }) => {
  const metrics = {
    cpu: getCPUInfo(),
    gpu: getGPUInfo(),
    memory: getMemoryInfo(),
    disk: getDiskInfo(),
    network: getNetworkInfo(),
    platform: getPlatformInfo(),
  };
  respond(true, metrics, void 0);
},

Note: The get*Info() functions are placeholders and should be replaced with actual implementations that gather the required system information.

Notes

  • The implementation of the system.metrics method will depend on the specific system and programming language being used.
  • Ensure that the method is properly tested and validated to ensure it returns accurate and complete system information.

Recommendation

Apply workaround: Implement the system.metrics gateway method as described above to provide the required system information to clients. This will enable monitoring of remote gateway instances and improve observability.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feature]: add `system.metrics` gateway method for remote system monitoring [1 participants]