Skip to Content
ReferenceToolssys_metrics

sys_metrics

CPU and RAM sample on Linux/macOS. System values are not container limits; cgroup quota and memory headroom are separate. Missing fields are unavailable.

Arguments

Over MCP every tool also takes machine: the machine’s name or id, optional when only one machine is online.

No other arguments.

Result

NameTypeRequiredMeaning
observed_at_msintegeryesUnix milliseconds when the observation request completed.
visible_cgroup_cpuobjectnoRaw charged CPU-time delta and local quota, only for a qualified visible cgroup-v2 root. This is not a host percentage or effective ancestor entitlement.
visible_cgroup_memoryobjectnoCurrent process’s cgroup memory limits across the visible hierarchy, if known. Neither a host memory reading nor a guarantee of all hidden ancestor limits.
visible_system_cpuobjectnoCPU execution percentage across the visible system, not the caller’s cgroup quota. Absent if a valid counter delta could not be established.
visible_system_memoryobjectnoVisible system memory, as reported by the OS/library; not container entitlement.

Examples

{ "name": "sys_metrics", "arguments": { "machine": "<machine>" } }

Limits

The call times out after 10 s (timed_out). Available since version 0.1.18. A refused or failed call returns one of the error codes.

Notes

The values describe the system visible to the machine program. The Linux cgroup fields, when available, describe observed CPU quota and memory headroom separately; they are not host-wide percentages or free RAM. Those fields are unavailable on macOS. An absent reading means unavailable, not zero. Native Windows is not supported by this tool.

This is a manual CPU and memory observation. For automatic reporting in Computers, see resource_reporting.